]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Bugfix: Replace all "-" by "_" for some internal variable name
authorMatthias Maier <tamiko@kyomu.43-1.org>
Sun, 28 Sep 2014 13:14:43 +0000 (15:14 +0200)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Sun, 28 Sep 2014 13:31:55 +0000 (15:31 +0200)
ENABLE_IF_SUPPORTED incorrectly exported invalid (cpp) macro definitions
containing a dash "-". Fix this by replacing all dashes with underscores
"_".

cmake/macros/macro_enable_if_supported.cmake

index a24c0e80a7886cf4a6a3715e7b71016b61cdde65..325ae83ecd0184a00631902f5ea90b4770816787 100644 (file)
@@ -1,6 +1,6 @@
 ## ---------------------------------------------------------------------
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -26,7 +26,7 @@ MACRO(ENABLE_IF_SUPPORTED _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}")
     CHECK_CXX_COMPILER_FLAG(
       "${_flag_stripped}"

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.