From b1b3f30e8d715b8a805c668a86885395fda24d56 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Tue, 6 Dec 2016 22:35:18 +0100 Subject: [PATCH] Fixed #151: don't ignore CMAKE_CXX_FLAGS command line argument. --- CMakeLists.txt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a36515f..8747ccee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1032,10 +1032,7 @@ IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") SET( CMAKE_CXX_FLAGS - "-D_REENTRANT=1 -W -Wall -pedantic -Warray-bounds-pointer-arithmetic -Wold-style-cast -Wconversion -Wcast-align -Wno-sign-conversion" - CACHE STRING - "C++ Compiler Flags" - FORCE + "${CMAKE_CXX_FLAGS} -D_REENTRANT=1 -W -Wall -pedantic -Warray-bounds-pointer-arithmetic -Wold-style-cast -Wconversion -Wcast-align -Wno-sign-conversion" ) SET(CMAKE_CXX_FLAGS_RELEASE "-O2") @@ -1050,10 +1047,7 @@ ELSE() SET( CMAKE_CXX_FLAGS - "-D_REENTRANT=1 -W -Wall -pedantic -Wpointer-arith -Wold-style-cast -Wconversion -Wcast-align -Wno-long-long" - CACHE STRING - "C++ Compiler Flags" - FORCE + "${CMAKE_CXX_FLAGS} -D_REENTRANT=1 -W -Wall -pedantic -Wpointer-arith -Wold-style-cast -Wconversion -Wcast-align -Wno-long-long" ) SET(CMAKE_CXX_FLAGS_RELEASE "-O2")