Skip to content

Commit 5f8c591

Browse files
committed
fix: correct indentation and formatting in CMakeLists.txt
1 parent 397dd91 commit 5f8c591

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

CMakeLists.txt

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,27 @@ else()
2121
set(CCR_EXCLUDE_FROM_ALL "EXCLUDE_FROM_ALL")
2222
endif()
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

3228
if (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+
)
4745
endif()
4846

4947
set(CMAKE_CXX_STANDARD 20)

0 commit comments

Comments
 (0)