From a0039eae8a7ce07272c41e62a2754ac2992309bb Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Mon, 18 Aug 2014 15:40:46 +0200 Subject: [PATCH] configure: also set the CMAKE_C*_FLAGS_DEBUG and CMAKE_C*_FLAGS_RELEASE of CXX_FLAGS is specified for me, setting only CMAKE_CXX_FLAGS did not do the trick when I was trying to compile everyting with libstdc++'s debug mode enabled. (it caused linker errors because opm-parser was not linked against std::debug in this case.) Maybe I got something wrong, though... --- cmake/Scripts/configure | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/Scripts/configure b/cmake/Scripts/configure index 69ba2ce45..408a6608a 100755 --- a/cmake/Scripts/configure +++ b/cmake/Scripts/configure @@ -494,11 +494,13 @@ for a in "${VARS[@]}"; do ;; CFLAGS=*) a=${a#CFLAGS=} - c_opts=" -DCMAKE_C_FLAGS=\"${a/\"/\\\"}\"" + a="${a/\"/\\\"}" + c_opts=" -DCMAKE_C_FLAGS=\"$a\" -DCMAKE_C_FLAGS_DEBUG=\"$a\" -DCMAKE_C_FLAGS_RELEASE=\"$a\" " ;; CXXFLAGS=*) a=${a#CXXFLAGS=} - cxx_opts=" -DCMAKE_CXX_FLAGS=\"${a/\"/\\\"}\"" + a="${a/\"/\\\"}" + cxx_opts=" -DCMAKE_CXX_FLAGS=\"$a\" -DCMAKE_CXX_FLAGS_DEBUG=\"$a\" -DCMAKE_CXX_FLAGS_RELEASE=\"$a\" " ;; FC=*) a=${a#FC=}