From: maier Date: Tue, 16 Jul 2013 11:55:24 +0000 (+0000) Subject: CMake: Improve renaming X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1dcf54a666af0c57134509b37b3a2e3465735f49;p=dealii-svn.git CMake: Improve renaming git-svn-id: https://svn.dealii.org/trunk@30010 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/setup_cached_variables.cmake b/deal.II/cmake/setup_cached_variables.cmake index 87250ab326..35777751ce 100644 --- a/deal.II/cmake/setup_cached_variables.cmake +++ b/deal.II/cmake/setup_cached_variables.cmake @@ -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)