]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Cleanup
authorMatthias Maier <tamiko@kyomu.43-1.org>
Thu, 28 Mar 2013 10:17:03 +0000 (10:17 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Thu, 28 Mar 2013 10:17:03 +0000 (10:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@29099 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/README.cmake
deal.II/cmake/config/CMakeLists.txt
deal.II/cmake/config/Config.cmake.in
deal.II/cmake/scripts/CMakeLists.txt
deal.II/cmake/setup_custom_targets.cmake
deal.II/cmake/setup_deal_ii.cmake
deal.II/cmake/setup_finalize.cmake
deal.II/source/meshworker/CMakeLists.txt

index 24ecbdde72fcbae38f9c361ffbcaf9230a78ec21..724cd4d607bdb2aa07db433f67a7d40654fff6f5 100644 (file)
@@ -12,8 +12,10 @@ Contains checks for platform features and compiler bugs and features
 ./config
 =======
 
-Contains configuration templates for installing deal.IIConfig.cmake and for
-the c++ template expansion mechanism
+Contains configuration templates for
+  - the project configuration (deal.IIConfig.cmake)
+  - the legacy Make.global_options mechanism
+  - the C++ template expansion mechanism (template-arguments)
 
 ./configure
 ===========
@@ -34,7 +36,7 @@ Contains Find<Library>.cmake modules for finding external libraries
 ./scripts
 =========
 
-Contains script files needed for the build system
+Contains script files needed for the build system, notably expand_instantiations
 
 
 ./setup_*.cmake
index 4b771f2a126a3e7d5cd37b346732eeb8e1ff700c..3b1d006f1a7c7748506b98516ab062aa896bbc13 100644 (file)
@@ -214,7 +214,7 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
   INSTALL(FILES
     ${CMAKE_CURRENT_BINARY_DIR}/template-arguments
     ${CMAKE_CURRENT_BINARY_DIR}/Make.global_options
-    DESTINATION common
+    DESTINATION ${DEAL_II_COMMON_RELDIR}
     COMPONENT compat_files
     )
 ENDIF()
index f2a47e8d99e8fea2c22d176eaf8ebb62007820dc..46bed777e82c539b79843844e3b82abf9e4918f0 100644 (file)
@@ -43,6 +43,7 @@ SET(DEAL_II_BUILD_TYPES "@DEAL_II_BUILD_TYPES@")
 
 SET(DEAL_II_PATH "@DEAL_II_PATH@")
 SET(DEAL_II_CMAKE_MACROS_RELDIR "@DEAL_II_CMAKE_MACROS_RELDIR@")
+SET(DEAL_II_COMMON_RELDIR "@DEAL_II_COMMON_RELDIR@")
 SET(DEAL_II_DOCUMENTATION_RELDIR "@DEAL_II_DOCUMENTATION_RELDIR@")
 SET(DEAL_II_EXAMPLES_RELDIR "@DEAL_II_EXAMPLES_RELDIR@")
 SET(DEAL_II_EXECUTABLE_RELDIR "@DEAL_II_EXECUTABLE_RELDIR@")
index b27b6cfd046202b6c85b18a622343dc441f8a63a..8f924f22de0580d5a94ccc368d8ecbd53e17cd96 100644 (file)
@@ -44,7 +44,7 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
 
   INSTALL(TARGETS make_dependencies report_features expand_instantiations
     RUNTIME
-    DESTINATION common/scripts
+    DESTINATION ${DEAL_II_COMMON_RELDIR}/scripts
     COMPONENT compat_files
     )
 ENDIF()
index 51000e80241cc5b9c56e5c2a5d93efabd807465c..a348a6dda7569ff775841436b63409a620fd20e6 100644 (file)
@@ -35,11 +35,11 @@ IF(DEAL_II_COMPONENT_DOCUMENTATION)
 ENDIF()
 
 IF(DEAL_II_COMPONENT_COMPAT_FILES)
-  ADD_CUSTOM_TARGET(compat_files)
-  ADD_DEPENDENCIES(compat_files
-    expand_instantiations
-    make_dependencies
-    report_features
+  ADD_CUSTOM_TARGET(compat_files
+    DEPENDS
+      expand_instantiations
+      make_dependencies
+      report_features
     )
 ENDIF()
 
index 95a32211dbcd9d95facee8e0b8ec40befd14ac39..110af8706d3d82b0d6c988025c33104ec75e66f8 100644 (file)
@@ -49,7 +49,7 @@
 #     DEAL_II_INCLUDE_DIRS
 #     DEAL_II_LIBRARY_DIRS
 #
-#     DEAL_II_BUILD_TYPE
+#     DEAL_II_BUILD_TYPES
 #     DEAL_II_WITH_BUNDLED_DIRECTORY
 #     DEAL_II_WITH_DOC_DIRECTORY
 #
@@ -95,6 +95,7 @@ IF(DEAL_II_COMPONENT_COMPAT_FILES)
   # The good, old directory structure:
   #
   SET_IF_EMPTY(DEAL_II_CMAKE_MACROS_RELDIR "cmake/macros")
+  SET_IF_EMPTY(DEAL_II_COMMON_RELDIR "common")
   SET_IF_EMPTY(DEAL_II_DOCUMENTATION_RELDIR "doc")
   SET_IF_EMPTY(DEAL_II_EXAMPLES_RELDIR "examples")
   SET_IF_EMPTY(DEAL_II_EXECUTABLE_RELDIR "bin")
@@ -107,6 +108,7 @@ ELSE()
   # obey the FSHS...
   #
   SET_IF_EMPTY(DEAL_II_CMAKE_MACROS_RELDIR "share/${DEAL_II_PACKAGE_NAME}/cmake/Macros")
+  SET_IF_EMPTY(DEAL_II_COMMON_RELDIR "share/${DEAL_II_PACKAGE_NAME}/common")
   SET_IF_EMPTY(DEAL_II_DOCUMENTATION_RELDIR "share/doc/${DEAL_II_PACKAGE_NAME}/html")
   SET_IF_EMPTY(DEAL_II_EXAMPLES_RELDIR "share/doc/${DEAL_II_PACKAGE_NAME}/examples")
   SET_IF_EMPTY(DEAL_II_EXECUTABLE_RELDIR "bin")
index 70e035e5f1ab2692ef2460607fdaebffb5b90761..1773ed5f82f616cf8f9fe491a8fbcb40039ff4b6 100644 (file)
@@ -57,9 +57,26 @@ ENDFOREACH()
 #                                                                         #
 ###########################################################################
 
-SET(_log "${CMAKE_BINARY_DIR}/summary.log")
-
-FILE(WRITE ${_log}
+SET(_log_detailed "${CMAKE_BINARY_DIR}/detailed.log")
+SET(_log_summary  "${CMAKE_BINARY_DIR}/summary.log")
+FILE(REMOVE ${_log_detailed} ${_log_summary})
+
+MACRO(_both)
+  # Write to both log files:
+  FILE(APPEND ${_log_detailed} ${ARGN})
+  FILE(APPEND ${_log_summary} ${ARGN})
+ENDMACRO()
+MACRO(_detailed)
+  # Only write to detailed.log:
+  FILE(APPEND ${_log_detailed} ${ARGN})
+ENDMACRO()
+MACRO(_summary)
+  # Only write to summary.log:
+  FILE(APPEND ${_log_summary} ${ARGN})
+ENDMACRO()
+
+
+_both(
 "###
 #
 #  ${DEAL_II_PACKAGE_NAME} configuration:
@@ -72,44 +89,41 @@ FILE(WRITE ${_log}
 #        CMAKE_CXX_COMPILER:     ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} on platform ${CMAKE_SYSTEM_NAME}
 #                                ${CMAKE_CXX_COMPILER}
 #
-#  Compiler flags used for this build:
+"
+  )
+
+_detailed(
+"#  Compiler flags used for this build:
 #        CMAKE_CXX_FLAGS:                     ${CMAKE_CXX_FLAGS}
 "
   )
 IF(CMAKE_BUILD_TYPE MATCHES "Release")
-  FILE(APPEND ${_log} "#        DEAL_II_CXX_FLAGS_RELEASE:           ${DEAL_II_CXX_FLAGS_RELEASE}\n")
+  _detailed("#        DEAL_II_CXX_FLAGS_RELEASE:           ${DEAL_II_CXX_FLAGS_RELEASE}\n")
 ENDIF()
 IF(CMAKE_BUILD_TYPE MATCHES "Debug")
-  FILE(APPEND ${_log} "#        DEAL_II_CXX_FLAGS_DEBUG:             ${DEAL_II_CXX_FLAGS_DEBUG}\n")
+  _detailed("#        DEAL_II_CXX_FLAGS_DEBUG:             ${DEAL_II_CXX_FLAGS_DEBUG}\n")
 ENDIF()
-FILE(APPEND ${_log} "#        CMAKE_SHARED_LINKER_FLAGS:           ${CMAKE_SHARED_LINKER_FLAGS}\n")
+_detailed("#        CMAKE_SHARED_LINKER_FLAGS:           ${CMAKE_SHARED_LINKER_FLAGS}\n")
 IF(CMAKE_BUILD_TYPE MATCHES "Release")
-  FILE(APPEND ${_log} "#        DEAL_II_SHARED_LINKER_FLAGS_RELEASE: ${DEAL_II_SHARED_LINKER_FLAGS_RELEASE}\n")
+  _detailed("#        DEAL_II_SHARED_LINKER_FLAGS_RELEASE: ${DEAL_II_SHARED_LINKER_FLAGS_RELEASE}\n")
 ENDIF()
 IF(CMAKE_BUILD_TYPE MATCHES "Debug")
-  FILE(APPEND ${_log} "#        DEAL_II_SHARED_LINKER_FLAGS_DEBUG:   ${DEAL_II_SHARED_LINKER_FLAGS_DEBUG}\n")
+  _detailed("#        DEAL_II_SHARED_LINKER_FLAGS_DEBUG:   ${DEAL_II_SHARED_LINKER_FLAGS_DEBUG}\n")
 ENDIF()
+_detailed("#\n")
 
 IF(NOT DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
-  FILE(APPEND ${_log} "#\n#  WARNING: DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS is set to OFF\n")
+  _both("#  WARNING: DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS is set to OFF\n")
 ENDIF()
-
-FILE(APPEND ${_log}
-  "#\n#  Configured Features ("
-  )
+_both("#  Configured Features (")
 IF(DEFINED DEAL_II_ALLOW_BUNDLED)
-  FILE(APPEND ${_log}
-    "DEAL_II_ALLOW_BUNDLED = ${DEAL_II_ALLOW_BUNDLED}, "
-    )
+  _both("DEAL_II_ALLOW_BUNDLED = ${DEAL_II_ALLOW_BUNDLED}, ")
 ENDIF()
 IF(DEAL_II_FORCE_AUTODETECTION)
-  FILE(APPEND ${_log}
-    "!!! DEAL_II_FORCE_AUTODETECTION=ON !!!, "
-    )
+  _both("!!! DEAL_II_FORCE_AUTODETECTION=ON !!!, ")
 ENDIF()
-FILE(APPEND ${_log}
-  "DEAL_II_ALLOW_AUTODETECTION = ${DEAL_II_ALLOW_AUTODETECTION}):\n"
-  )
+_both("DEAL_II_ALLOW_AUTODETECTION = ${DEAL_II_ALLOW_AUTODETECTION}):\n")
+
 
 #
 # Cache for quicker access:
@@ -130,7 +144,7 @@ FOREACH(_var ${_features})
     # FEATURE is enabled
     STRING(REGEX REPLACE "^DEAL_II_WITH_" "" _feature ${_var})
     IF(FEATURE_${_feature}_EXTERNAL_CONFIGURED)
-      FILE(APPEND ${_log} "#        ${_var} set up with external dependencies\n")
+      _both("#        ${_var} set up with external dependencies\n")
 
       #
       # Print the feature configuration:
@@ -146,38 +160,41 @@ FOREACH(_var ${_features})
             ( (NOT _var2 MATCHES "^(MPI|Boost)") AND
               _var2 MATCHES "^${_feature}_(INCLUDE_DIRS|LIBRARIES|LINKER_FLAGS)$" )
           )
-          FILE(APPEND ${_log} "#            ${_var2} = ${${_var2}}\n")
+          _detailed("#            ${_var2} = ${${_var2}}\n")
         ENDIF()
       ENDFOREACH()
 
     ELSEIF(FEATURE_${_feature}_BUNDLED_CONFIGURED)
       IF(DEAL_II_FORCE_BUNDLED_${_feature})
-        FILE(APPEND ${_log} "#        ${_var} set up with bundled packages (forced)\n")
+        _both("#        ${_var} set up with bundled packages (forced)\n")
       ELSE()
-        FILE(APPEND ${_log} "#        ${_var} set up with bundled packages\n")
+        _both("#        ${_var} set up with bundled packages\n")
       ENDIF()
     ENDIF()
   ELSE()
     # FEATURE is disabled
-    FILE(APPEND ${_log} "#      ( ${_var} = ${${_var}} )\n")
+    _both("#      ( ${_var} = ${${_var}} )\n")
   ENDIF()
 ENDFOREACH()
 
-FILE(APPEND ${_log}
+_both(
   "#\n#  Component configuration:\n"
   )
 FOREACH(_var ${_components})
   IF(_var MATCHES "DEAL_II_COMPONENT")
     IF(${${_var}})
-      FILE(APPEND ${_log} "#        ${_var}\n")
+      _both("#        ${_var}\n")
       STRING(REPLACE "DEAL_II_COMPONENT_" "" _component ${_var})
       LIST(APPEND _components ${_component})
     ELSE()
-      FILE(APPEND ${_log} "#      ( ${_var} = ${${_var}} )\n")
+      _both("#      ( ${_var} = ${${_var}} )\n")
     ENDIF()
   ENDIF()
 ENDFOREACH()
 
-FILE(APPEND ${_log}
-  "#\n###"
+_summary(
+  "#\n# Detailed information (compiler flags, feature configuration) can be found in detailed.log\n"
   )
+
+_both("#\n###")
+
index 85ff52b6c4fb838b3db768464b6aa301f8cb8563..888296f13e9d0862ad0bd32125c10981c800035b 100644 (file)
 INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
 
 FILE(GLOB _header
-  ${CMAKE_SOURCE_DIR}/include/deal.II/mesh_worker/*.h
+  ${CMAKE_SOURCE_DIR}/include/deal.II/meshworker/*.h
   )
 
 SET(_src
   )
 
-DEAL_II_ADD_LIBRARY(obj_mesh_worker OBJECT ${_src} ${_header})
+DEAL_II_ADD_LIBRARY(obj_meshworker OBJECT ${_src} ${_header})

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.