From 20e924d9798018d8b9be675685678bbae90bb8cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 7 Dec 2016 22:44:56 +0100 Subject: [PATCH] Fix CXX flags in various CMake build types The flags we were defining for _DEBUG and _RELEASE were similar to the default CMake flags for those types, which get appended to CMAKE_CXX_FLAGS, so we only need to customize the latter. The final flags will be for e.g. RelWithDebInfo: ${CMAKE_CXX_FLAGS} ${CXXFLAGS} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} with ${CXXFLAGS} taken from the environment. --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 84a24ed..6b5f226 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,9 +18,7 @@ endif() ### CMake config -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 --std=c++11") -set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wno-parentheses -pedantic -g -pg --std=c++11") -set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -Wno-parentheses -O2 -std=c++11") +set(CMAKE_CXX_FLAGS "-Wall -Wno-parentheses --std=c++11 ${CMAKE_CXX_FLAGS}") if(APPLE) set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX") -- 2.39.2