From 413bdbb7b53a15d0ef4d2d981510932fe8fdd030 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sun, 28 Sep 2014 15:14:43 +0200 Subject: [PATCH] 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 "_". --- cmake/macros/macro_enable_if_supported.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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}" -- 2.39.5