File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -70,10 +70,10 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
70
70
"${CMAKE_CXX_COMPILER_ID} " STREQUAL "AppleClang" OR
71
71
"${CMAKE_CXX_COMPILER_ID} " STREQUAL "GNU"
72
72
)
73
- set (enable_coverage off CACHE BOOL "Build with coverage recording" )
73
+ option (enable_coverage "Build with coverage recording" )
74
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" )
75
+ if (enable_coverage )
76
+ add_compile_options ( --coverage -g )
77
77
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage -g" )
78
78
if (NOT DEFINED CODE_COVERAGE_OUTPUT_DIR )
79
79
set (CODE_COVERAGE_OUTPUT_DIR ${CMAKE_BINARY_DIR} /html )
You can’t perform that action at this time.
0 commit comments