cmake: update makefiles to not clobber flags vars, fixes #178

This commit is contained in:
Harry van Haaren 2017-04-09 16:10:27 +01:00
parent c0452772a0
commit 3c2392a66c
2 changed files with 6 additions and 6 deletions

View file

@ -13,7 +13,7 @@ set -e
# setup environment: Copy material for tests to /tmp
cp -r ../src/tests/lupppTestMaterial /tmp
rm CMakeCache.txt
rm -f CMakeCache.txt
scan-build cmake -DBUILD_TESTS=1 ../

View file

@ -40,14 +40,14 @@ IF(BUILD_TESTS)
ADD_DEFINITIONS(-DBUILD_TESTS)
ADD_DEFINITIONS(-DBUILD_COVERAGE_TEST)
SET(CMAKE_CXX_FLAGS " -g -Wall -Wextra -Wno-unused-variable -fprofile-arcs -ftest-coverage ")
SET(CMAKE_C_FLAGS " -g -Wall -Wextra -W -Wno-unused-variable -fprofile-arcs -ftest-coverage ")
SET(CMAKE_EXE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -Wno-unused-variable -fprofile-arcs -ftest-coverage ")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wextra -W -Wno-unused-variable -fprofile-arcs -ftest-coverage ")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}-fprofile-arcs -ftest-coverage")
ENDIF(BUILD_TESTS)
IF(RELEASE_BUILD)
SET(CMAKE_CXX_FLAGS " -g -Wall -Wno-unused-variable ")
SET(CMAKE_C_FLAGS " -g -Wall -W -Wno-unused-variable ")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wno-unused-variable ")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -W -Wno-unused-variable ")
ENDIF(RELEASE_BUILD)
if( ${ARCHITECTURE} STREQUAL "x86_64" )