File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -21,29 +21,27 @@ else()
2121 set (CCR_EXCLUDE_FROM_ALL "EXCLUDE_FROM_ALL" )
2222endif ()
2323
24- option (
25- CCR_FETCH_DEPS
26- "Fetch dependencies via FetchContent."
27- On
28- )
29-
30- option (CCR_BUILD_TESTS "Enable building the tests" ${CCR_DEFAULTOPT} )
24+ option (CCR_FETCH_DEPS "Fetch dependencies via FetchContent." On )
25+ option (CCR_BUILD_TESTS "Enable build of the tests" ${CCR_DEFAULTOPT} )
26+ option (CCR_ENABLE_COVERAGE "Enable compiler flags for code coverage measurements" Off )
3127
3228if (CCR_BUILD_TESTS)
3329 ccr_enable_testing()
30+ endif ()
3431
32+ if (CCR_ENABLE_COVERAGE)
3533 find_program (GCOVR_PATH gcovr)
3634
3735 if (NOT GCOVR_PATH)
38- message (FATAL_ERROR "Could not find gcovr, which is required for code coverage IDE integration" )
36+ message (FATAL_ERROR "Could not find gcovr, which is required for code coverage IDE integration" )
3937 endif ()
4038
4139 add_custom_target (
4240 generate-coverage-report
4341 COMMAND ${GCOVR_PATH} --delete --lcov ${CMAKE_CURRENT_BINARY_DIR} /lcov.info
4442 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
4543 COMMENT "Generating code coverage report in LCOV format"
46- )
44+ )
4745endif ()
4846
4947set (CMAKE_CXX_STANDARD 20)
You can’t perform that action at this time.
0 commit comments