]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Add a schortcut for configuration:
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 31 Mar 2013 20:37:59 +0000 (20:37 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 31 Mar 2013 20:37:59 +0000 (20:37 +0000)
 - WITH_* gets replaced by DEAL_II_WITH_*
 - COMPONENT_* gets replaced by DEAL_II_COMPONENT_*
 - Just providing a component name gets replaced by DEAL_II_COMPONENT_*

git-svn-id: https://svn.dealii.org/trunk@29121 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/setup_cached_variables.cmake

index d22cedd0ef353670b7c39915616210103844bbec..27b2a53c5e81bf249b21bbbc162661a263b25298 100644 (file)
@@ -101,6 +101,7 @@ IF("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
     )
 ENDIF()
 
+
 ###########################################################################
 #                                                                         #
 #                        Compilation and linking:                         #
@@ -229,14 +230,40 @@ FOREACH(_flag ${DEAL_II_USED_FLAGS})
   MARK_AS_ADVANCED(${_flag})
 ENDFOREACH()
 
-IF(DEAL_II_FORCE_AUTODETECTION)
+
+###########################################################################
+#                                                                         #
+#                          Miscellanious setup:                           #
+#                                                                         #
+###########################################################################
+
+GET_CMAKE_PROPERTY(_res VARIABLES)
+FOREACH(_var ${_res})
   #
-  # Undefine all feature toggles DEAL_II_WITH_* prior to configure:
+  # Rename WITH_* by DEAL_II_WITH_*
   #
-  GET_CMAKE_PROPERTY(_res VARIABLES)
-  FOREACH(_var ${_res})
-    IF(_var MATCHES "DEAL_II_WITH_")
-      UNSET(${_var} CACHE)
-    ENDIF()
-  ENDFOREACH()
-ENDIF()
+  IF(_var MATCHES "^WITH_")
+    SET(DEAL_II_${_var} ${${_var}} CACHE BOOL "" FORCE)
+    UNSET(${_var} CACHE)
+  ENDIF()
+
+  #
+  # Same for components:
+  #
+  IF(_var MATCHES "^COMPONENT_")
+    SET(DEAL_II_${_var} ${${_var}} CACHE BOOL "" FORCE)
+    UNSET(${_var} CACHE)
+  ENDIF()
+  IF(_var MATCHES "^(COMPAT_FILES|DOCUMENTATION|EXAMPLES|CONTRIB)")
+    SET(DEAL_II_COMPONENT_${_var} ${${_var}} CACHE BOOL "" FORCE)
+    UNSET(${_var} CACHE)
+  ENDIF()
+
+  #
+  # If DEAL_II_FORCE_AUTODETECTION is set undefine all feature toggles
+  # DEAL_II_WITH_* prior to configure:
+  #
+  IF(DEAL_II_FORCE_AUTODETECTION AND _var MATCHES "^DEAL_II_WITH_")
+    UNSET(${_var} CACHE)
+  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.