From: maier Date: Wed, 27 Mar 2013 16:56:22 +0000 (+0000) Subject: CMake: Bugfix: Remove invalid characters from test names in ENABLE_IF_(SUPPORTED... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=859201e09f84f3e2be5f7086d7c38f06cf81e086;p=dealii-svn.git CMake: Bugfix: Remove invalid characters from test names in ENABLE_IF_(SUPPORTED|LINKS) git-svn-id: https://svn.dealii.org/trunk@29079 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/macros/macro_enable_if_links.cmake b/deal.II/cmake/macros/macro_enable_if_links.cmake index 2a1bf93127..6fcfb9133c 100644 --- a/deal.II/cmake/macros/macro_enable_if_links.cmake +++ b/deal.II/cmake/macros/macro_enable_if_links.cmake @@ -24,6 +24,8 @@ MACRO(ENABLE_IF_LINKS _variable _flag) STRING(STRIP "${_flag}" _flag_stripped) STRING(REGEX REPLACE "^-" "" _flag_name "${_flag_stripped}") + STRING(REPLACE "," "" _flag_name "${_flag_name}") + STRING(REPLACE "-" "_" _flag_name "${_flag_name}") IF(NOT "${_flag_stripped}" STREQUAL "") ADD_FLAGS(CMAKE_REQUIRED_FLAGS "${_flag_stripped}") diff --git a/deal.II/cmake/macros/macro_enable_if_supported.cmake b/deal.II/cmake/macros/macro_enable_if_supported.cmake index ed63ec4788..bd989f8877 100644 --- a/deal.II/cmake/macros/macro_enable_if_supported.cmake +++ b/deal.II/cmake/macros/macro_enable_if_supported.cmake @@ -24,6 +24,8 @@ MACRO(ENABLE_IF_SUPPORTED _variable _flag) STRING(STRIP "${_flag}" _flag_stripped) IF(NOT "${_flag_stripped}" STREQUAL "") STRING(REGEX REPLACE "^-" "" _flag_name "${_flag_stripped}") + STRING(REPLACE "," "" _flag_name "${_flag_name}") + STRING(REPLACE "-" "_" _flag_name "${_flag_name}") CHECK_CXX_COMPILER_FLAG( "${_flag_stripped}" DEAL_II_HAVE_FLAG_${_flag_name}