From b0a7d5592741778aae92010974e73d503c23b18f Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 16 Jul 2013 11:55:24 +0000 Subject: [PATCH] CMake: Improve renaming git-svn-id: https://svn.dealii.org/trunk@30010 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/setup_cached_variables.cmake | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) 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) -- 2.39.5