]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Improve renaming
authorMatthias Maier <tamiko@kyomu.43-1.org>
Tue, 16 Jul 2013 11:55:24 +0000 (11:55 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Tue, 16 Jul 2013 11:55:24 +0000 (11:55 +0000)
git-svn-id: https://svn.dealii.org/trunk@30010 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/setup_cached_variables.cmake

index 87250ab3260c3a418fdebe51119d30afa95daf71..35777751cee7b96db0865713666a472c920f166f 100644 (file)
@@ -299,20 +299,18 @@ UNSET(ENV{LDFLAGS})
 GET_CMAKE_PROPERTY(_res VARIABLES)
 FOREACH(_var ${_res})
   #
-  # Rename WITH_* by DEAL_II_WITH_*
+  # Rename (ALLOW|WITH|FORCE|COMPONENT)_* by DEAL_II_(ALLOW|WITH|FORCE|COMPONENT)_*
   #
-  IF(_var MATCHES "^WITH_")
-    SET(DEAL_II_${_var} ${${_var}} CACHE BOOL "" FORCE)
-    UNSET(${_var} CACHE)
-  ENDIF()
+  FOREACH(_match ALLOW_ WITH_ FORCE_ COMPONENT_)
+    IF(_var MATCHES "^${_match}")
+      SET(DEAL_II_${_var} ${${_var}} CACHE BOOL "" FORCE)
+      UNSET(${_var} CACHE)
+    ENDIF()
+  ENDFOREACH()
 
   #
   # 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|MESH_CONVERTER|PARAMETER_GUI)")
     SET(DEAL_II_COMPONENT_${_var} ${${_var}} CACHE BOOL "" FORCE)
     UNSET(${_var} CACHE)

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.