From 5cba7ce005d670ff43e397b51f685967efe3f0e6 Mon Sep 17 00:00:00 2001 From: maier Date: Wed, 3 Apr 2013 21:10:22 +0000 Subject: [PATCH] CMake: Split the "contrib" component into two separate "mesh_converter" and "parameter_gui" components git-svn-id: https://svn.dealii.org/trunk@29168 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/setup_cached_variables.cmake | 22 +++++++---- deal.II/cmake/setup_custom_targets.cmake | 9 ----- deal.II/contrib/CMakeLists.txt | 5 ++- .../contrib/mesh_conversion/CMakeLists.txt | 10 ++--- deal.II/contrib/parameter_gui/CMakeLists.txt | 12 +++--- deal.II/doc/development/Config.sample | 12 ++++-- deal.II/doc/development/cmake.html | 37 ++++++++++++------- deal.II/doc/readme.html | 15 +++++--- 8 files changed, 70 insertions(+), 52 deletions(-) diff --git a/deal.II/cmake/setup_cached_variables.cmake b/deal.II/cmake/setup_cached_variables.cmake index 27b2a53c5e..8d38aeab67 100644 --- a/deal.II/cmake/setup_cached_variables.cmake +++ b/deal.II/cmake/setup_cached_variables.cmake @@ -19,12 +19,13 @@ # # General configuration options: # +# DEAL_II_ALLOW_AUTODETECTION # DEAL_II_ALLOW_BUNDLED # DEAL_II_COMPONENT_COMPAT_FILES -# DEAL_II_COMPONENT_CONTRIB # DEAL_II_COMPONENT_DOCUMENTATION # DEAL_II_COMPONENT_EXAMPLES -# DEAL_II_ALLOW_AUTODETECTION +# DEAL_II_COMPONENT_MESH_CONVERTER +# DEAL_II_COMPONENT_PARAMETER_GUI # DEAL_II_FORCE_AUTODETECTION # # Options regarding compilation and linking: @@ -66,11 +67,6 @@ OPTION(DEAL_II_COMPONENT_COMPAT_FILES ON ) -OPTION(DEAL_II_COMPONENT_CONTRIB - "Enable installation of contrib packages. This adds a COMPONENT \"contrib\" to the build system." - OFF - ) - If(DEAL_II_HAVE_DOC_DIRECTORY) OPTION(DEAL_II_COMPONENT_DOCUMENTATION "Enable configuration, build and installation of the documentation. This adds a COMPONENT \"documentation\" to the build system." @@ -83,6 +79,16 @@ OPTION(DEAL_II_COMPONENT_EXAMPLES ON ) +OPTION(DEAL_II_COMPONENT_MESH_CONVERTER + "Build and install the mesh_converter. This adds a COMPONENT \"mesh_converter\" to the build system." + OFF + ) + +OPTION(DEAL_II_COMPONENT_PARAMETER_GUI + "Build and install the parameter_gui. This adds a COMPONENT \"parameter_gui\" to the build system." + OFF + ) + OPTION(DEAL_II_ALLOW_AUTODETECTION "Allow to automatically setup features by setting all undefined DEAL_II_WITH_* variables to ON or OFF" ON @@ -254,7 +260,7 @@ FOREACH(_var ${_res}) SET(DEAL_II_${_var} ${${_var}} CACHE BOOL "" FORCE) UNSET(${_var} CACHE) ENDIF() - IF(_var MATCHES "^(COMPAT_FILES|DOCUMENTATION|EXAMPLES|CONTRIB)") + IF(_var MATCHES "^(COMPAT_FILES|DOCUMENTATION|EXAMPLES|MESH_CONVERTER|PARAMETER_GUI)") SET(DEAL_II_COMPONENT_${_var} ${${_var}} CACHE BOOL "" FORCE) UNSET(${_var} CACHE) ENDIF() diff --git a/deal.II/cmake/setup_custom_targets.cmake b/deal.II/cmake/setup_custom_targets.cmake index a348a6dda7..2f7b56efa8 100644 --- a/deal.II/cmake/setup_custom_targets.cmake +++ b/deal.II/cmake/setup_custom_targets.cmake @@ -42,12 +42,3 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES) report_features ) ENDIF() - -IF(DEAL_II_COMPONENT_CONTRIB) - ADD_CUSTOM_TARGET(contrib - DEPENDS - mesh_conversion - parameter_gui - ) -ENDIF() - diff --git a/deal.II/contrib/CMakeLists.txt b/deal.II/contrib/CMakeLists.txt index 60dc9e9c68..c6569084fb 100644 --- a/deal.II/contrib/CMakeLists.txt +++ b/deal.II/contrib/CMakeLists.txt @@ -12,8 +12,11 @@ ## ##### -IF(DEAL_II_COMPONENT_CONTRIB) +IF(DEAL_II_COMPONENT_MESH_CONVERTER) ADD_SUBDIRECTORY(mesh_conversion) +ENDIF() + +IF(DEAL_II_COMPONENT_PARAMETER_GUI) ADD_SUBDIRECTorY(parameter_gui) ENDIF() diff --git a/deal.II/contrib/mesh_conversion/CMakeLists.txt b/deal.II/contrib/mesh_conversion/CMakeLists.txt index 429976f687..c198104103 100644 --- a/deal.II/contrib/mesh_conversion/CMakeLists.txt +++ b/deal.II/contrib/mesh_conversion/CMakeLists.txt @@ -1,6 +1,6 @@ ##### ## -## Copyright (C) 2012 by the deal.II authors +## Copyright (C) 2012, 2013 by the deal.II authors ## ## This file is part of the deal.II library. ## @@ -15,9 +15,9 @@ ##### CMAKE_MINIMUM_REQUIRED(VERSION 2.8) -#PROJECT(parameter_gui) +#PROJECT(mesh_converter) -ADD_EXECUTABLE(mesh_conversion +ADD_EXECUTABLE(mesh_converter Main.cc MeshConversion.cc ) @@ -26,9 +26,9 @@ IF("${DEAL_II_EXECUTABLE_RELDIR}" STREQUAL "") SET(DEAL_II_EXECUTABLE_RELDIR "bin") ENDIF() -INSTALL(TARGETS mesh_conversion +INSTALL(TARGETS mesh_converter RUNTIME DESTINATION ${DEAL_II_EXECUTABLE_RELDIR} - COMPONENT contrib + COMPONENT mesh_converter ) diff --git a/deal.II/contrib/parameter_gui/CMakeLists.txt b/deal.II/contrib/parameter_gui/CMakeLists.txt index a5292b1410..929bb5e2a1 100644 --- a/deal.II/contrib/parameter_gui/CMakeLists.txt +++ b/deal.II/contrib/parameter_gui/CMakeLists.txt @@ -1,6 +1,6 @@ ##### ## -## Copyright (C) 2012 by the deal.II authors +## Copyright (C) 2012, 2013 by the deal.II authors ## ## This file is part of the deal.II library. ## @@ -13,7 +13,7 @@ ##### CMAKE_MINIMUM_REQUIRED(VERSION 2.8) -#PROJECT(parameterGUI) +#PROJECT(parameter_gui) FIND_PACKAGE(Qt4 REQUIRED QtCore QtGui QtXml) MARK_AS_ADVANCED(QT_QMAKE_EXECUTABLE) @@ -33,7 +33,7 @@ QT4_ADD_RESOURCES(SOURCE_RCC application.qrc ) -ADD_EXECUTABLE(parameterGUI +ADD_EXECUTABLE(parameter_gui browse_lineedit.cpp info_message.cpp main.cpp @@ -45,15 +45,15 @@ ADD_EXECUTABLE(parameterGUI ${SOURCE_RCC} ) -TARGET_LINK_LIBRARIES(parameterGUI ${QT_LIBRARIES}) +TARGET_LINK_LIBRARIES(parameter_gui ${QT_LIBRARIES}) IF("${DEAL_II_EXECUTABLE_RELDIR}" STREQUAL "") SET(DEAL_II_EXECUTABLE_RELDIR "bin") ENDIF() -INSTALL(TARGETS parameterGUI +INSTALL(TARGETS parameter_gui RUNTIME DESTINATION ${DEAL_II_EXECUTABLE_RELDIR} - COMPONENT contrib + COMPONENT parameter_gui ) diff --git a/deal.II/doc/development/Config.sample b/deal.II/doc/development/Config.sample index 30b3671fe4..28d2dbf940 100644 --- a/deal.II/doc/development/Config.sample +++ b/deal.II/doc/development/Config.sample @@ -20,10 +20,6 @@ # "Enable installation of the example steps. This adds a COMPONENT \"compat_files\" to the build system." # ) # -# SET(DEAL_II_COMPONENT_CONTRIB OFF CACHE BOOL -# "Enable installation of contrib packages. This adds a COMPONENT \"contrib\" to the build system." -# ) -# # SET(DEAL_II_COMPONENT_DOCUMENTATION OFF CACHE BOOL # "Enable configuration, build and installation of the html documentation. This adds a COMPONENT \"documentation\" to the build system." # ) @@ -32,6 +28,14 @@ # "Enable configuration and installation of the example steps. This adds a COMPONENT \"examples\" to the build system." # ) # +# SET(DEAL_II_COMPONENT_MESH_CONVERTER OFF CACHE BOOL +# "Build and install the mesh_converter. This adds a COMPONENT \"mesh_converter\" to the build system." +# ) +# +# SET(DEAL_II_COMPONENT_PARAMETER_GUI OFF CACHE BOOL +# "Build and install the parameter_gui. This adds a COMPONENT \"parameter_gui\" to the build system." +# ) +# # diff --git a/deal.II/doc/development/cmake.html b/deal.II/doc/development/cmake.html index debc969fc5..a08f6996ff 100644 --- a/deal.II/doc/development/cmake.html +++ b/deal.II/doc/development/cmake.html @@ -438,19 +438,6 @@ deal.II will be configured, built and installed:

diff --git a/deal.II/doc/readme.html b/deal.II/doc/readme.html index f5edeaf7f8..68c00eb0cb 100644 --- a/deal.II/doc/readme.html +++ b/deal.II/doc/readme.html @@ -388,17 +388,20 @@
  • - If you wish to install projects residing under - contrib/ such as ParameterGUI, - specify -DDEAL_II_COMPONENT_CONTRIB=ON. - Beware of the fact that parameterGUI needs - development packages for Qt. + mesh_converter: If you wish to compile and install the + mesh_converter, specify + -DDEAL_II_COMPONENT_MESH_CONVERTER=ON. +

    +

    + parameter_gui: If you wish to compile and install the + parameter_gui, specify + -DDEAL_II_COMPONENT_PARAMETER_GUI=ON. Beware of the + fact that parameterGUI needs development packages for Qt.

    -

    Optional interfaces to other software packages

    -- 2.39.5