From: Matthias Maier Date: Sun, 28 Sep 2014 13:14:43 +0000 (+0200) Subject: CMake: Bugfix: Replace all "-" by "_" for some internal variable name X-Git-Tag: v8.2.0-rc1~123^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=413bdbb7b53a15d0ef4d2d981510932fe8fdd030;p=dealii.git CMake: Bugfix: Replace all "-" by "_" for some internal variable name ENABLE_IF_SUPPORTED incorrectly exported invalid (cpp) macro definitions containing a dash "-". Fix this by replacing all dashes with underscores "_". --- diff --git a/cmake/macros/macro_enable_if_supported.cmake b/cmake/macros/macro_enable_if_supported.cmake index a24c0e80a7..325ae83ecd 100644 --- a/cmake/macros/macro_enable_if_supported.cmake +++ b/cmake/macros/macro_enable_if_supported.cmake @@ -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}"