We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5a6e58b + 0894e96 commit 2953f43Copy full SHA for 2953f43
CMakeLists.txt
@@ -70,10 +70,10 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
70
"${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang" OR
71
"${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU"
72
)
73
- set(enable_coverage off CACHE BOOL "Build with coverage recording")
+ option(enable_coverage "Build with coverage recording")
74
set(parallel_tests "1" CACHE STRING "Number of tests to run in parallel")
75
- if(${enable_coverage})
76
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage -g")
+ if(enable_coverage)
+ add_compile_options(--coverage -g)
77
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage -g")
78
if (NOT DEFINED CODE_COVERAGE_OUTPUT_DIR)
79
set(CODE_COVERAGE_OUTPUT_DIR ${CMAKE_BINARY_DIR}/html)
0 commit comments