code coverage for all files if in debug mode

This commit is contained in:
Neeflix
2018-07-11 23:38:13 +02:00
parent cceb2db0a3
commit 7cb8ff24c9
2 changed files with 11 additions and 9 deletions

View File

@@ -5,13 +5,6 @@ project(FlippR-Driver-Tests VERSION 0.1.0 LANGUAGES CXX)
# Compile tests to output_path/tests
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/${OUTPUT_PATH}/tests)
#set code-coverage flags
SET(GCC_COVERAGE_COMPILE_FLAGS "-fprofile-arcs -ftest-coverage")
SET(GCC_COVERAGE_LINK_FLAGS "-lgcov")
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}" )
SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}" )
file(GLOB_RECURSE SOURCES *.cpp)