]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Print external libraries in the summary
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 23 Mar 2013 23:57:18 +0000 (23:57 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 23 Mar 2013 23:57:18 +0000 (23:57 +0000)
git-svn-id: https://svn.dealii.org/trunk@29001 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/TODO.CMAKE
deal.II/cmake/setup_finalize.cmake

index ba1d1c7067097c2583405ddfa9b801e784e02c49..6b5c2e5627f54c76bd43469541b5cd83d085d50c 100644 (file)
@@ -10,6 +10,8 @@ Some last bits and thoughts:
 
 * Provide a configuration template for cross compiling with CMake,
 
+* Support debug;optimized;general for all FEATURES
+
 * document that we no longer need the two-lib installation of p4est
 
 * adjust doc/development/testsuite.html
index 1c551bc779651761fd312ecdf40589e9fc1e96fc..77af8b2058f88600e79de0378fa1144aeda621ee 100644 (file)
@@ -92,8 +92,6 @@ ENDIF()
 
 IF(NOT DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
   FILE(APPEND ${_log} "#\n#  WARNING: DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS is set to OFF\n")
-ELSEIF(NOT DEAL_II_KNOWN_COMPILER)
-  FILE(APPEND ${_log} "#\n#  WARNING: Unknown compiler! Please set compiler flags by hand.\n")
 ENDIF()
 
 FILE(APPEND ${_log}
@@ -113,25 +111,51 @@ FILE(APPEND ${_log}
   "DEAL_II_ALLOW_AUTODETECTION = ${DEAL_II_ALLOW_AUTODETECTION}):\n"
   )
 
-GET_CMAKE_PROPERTY(_res VARIABLES)
-FOREACH(_var ${_res})
+#
+# Cache for quicker access:
+#
+GET_CMAKE_PROPERTY(_variables VARIABLES)
+FOREACH(_var ${_variables})
   IF(_var MATCHES "DEAL_II_WITH")
-    IF(${${_var}})
-      # 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")
-      ELSEIF(FEATURE_${_feature}_BUNDLED_CONFIGURED)
-        IF(DEAL_II_FORCE_BUNDLED_${_feature})
-          FILE(APPEND ${_log} "#        ${_var} set up with bundled packages (forced)\n")
-        ELSE()
-          FILE(APPEND ${_log} "#        ${_var} set up with bundled packages\n")
+    LIST(APPEND _features "${_var}")
+  ELSEIF(_var MATCHES "(COMPILER|COMPILE_FLAGS|LINK_FLAGS|LIBRARIES|INCLUDE_PATH|INCLUDE_DIRS|LINKER_FLAGS)")
+    LIST(APPEND _features_config ${_var})
+  ENDIF()
+ENDFOREACH()
+
+FOREACH(_var ${_features})
+  IF(${${_var}})
+    # 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")
+
+      #
+      # Print the feature configuration:
+      #
+      FOREACH(_var2 ${_features_config})
+        IF( # MPI:
+            _var2 MATCHES "^${_feature}_CXX_(COMPILER|COMPILE_FLAGS|LINK_FLAGS|LIBRARIES|INCLUDE_PATH)$" OR
+            # Boost:
+            ( _feature MATCHES "BOOST" AND _var2 MATCHES "^Boost(_LIBRARIES|_INCLUDE_DIRS)$" ) OR
+            # Generic:
+            ( (NOT _var2 MATCHES "^(MPI|Boost)") AND
+              _var2 MATCHES "^${_feature}_(INCLUDE_DIRS|LIBRARIES|LINKER_FLAGS)$" )
+          )
+          FILE(APPEND ${_log} "#            ${_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")
+      ELSE()
+        FILE(APPEND ${_log} "#        ${_var} set up with bundled packages\n")
       ENDIF()
-    ELSE()
-      # FEATURE is disabled
-      FILE(APPEND ${_log} "#      ( ${_var} = ${${_var}} )\n")
     ENDIF()
+  ELSE()
+    # FEATURE is disabled
+    FILE(APPEND ${_log} "#      ( ${_var} = ${${_var}} )\n")
   ENDIF()
 ENDFOREACH()
 

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.