]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Bugfix: Also sanitize (cpp) macros in enable_if_links 185/head
authorMatthias Maier <matthias.maier@iwr.uni-heidelberg.de>
Wed, 1 Oct 2014 13:10:45 +0000 (15:10 +0200)
committerMatthias Maier <matthias.maier@iwr.uni-heidelberg.de>
Wed, 1 Oct 2014 13:10:45 +0000 (15:10 +0200)
cmake/macros/macro_enable_if_links.cmake
cmake/macros/macro_enable_if_supported.cmake

index 21d33b31e72d84a15a19b7bcad58a63dc07def08..9f6191b225ab185dd9c3e03ee3f4a458917a6311 100644 (file)
@@ -27,7 +27,8 @@ MACRO(ENABLE_IF_LINKS _variable _flag)
   IF(NOT "${_flag_stripped}" STREQUAL "")
     STRING(REGEX REPLACE "^-" "" _flag_name "${_flag_stripped}")
     STRING(REPLACE "," "" _flag_name "${_flag_name}")
-    STRING(REPLACE "--" "__" _flag_name "${_flag_name}")
+    STRING(REPLACE "-" "_" _flag_name "${_flag_name}")
+    STRING(REPLACE "+" "_" _flag_name "${_flag_name}")
     SET(_backup ${CMAKE_REQUIRED_LIBRARIES})
     LIST(APPEND CMAKE_REQUIRED_LIBRARIES "${_flag_stripped}")
     CHECK_CXX_COMPILER_FLAG(
index 198d90a8e39afe86eaccbfbfc5b843cd827501e4..1485fb57df58a0958cb09ffc6dc6abcb41953d07 100644 (file)
@@ -38,7 +38,7 @@ MACRO(ENABLE_IF_SUPPORTED _variable _flag)
     STRING(REGEX REPLACE "^-" "" _flag_name "${_flag_stripped}")
     STRING(REPLACE "," "" _flag_name "${_flag_name}")
     STRING(REPLACE "-" "_" _flag_name "${_flag_name}")
-    STRING(REPLACE "++" "__" _flag_name "${_flag_name}")
+    STRING(REPLACE "+" "_" _flag_name "${_flag_name}")
     CHECK_CXX_COMPILER_FLAG(
       "${_werror_string}${_flag_stripped}"
       DEAL_II_HAVE_FLAG_${_flag_name}

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.