Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
include(codecov)
# Coverage tooling is opt-in: the codecov/FindGcov/FindLcov modules are fetched
# from a third-party server by CMakeCM, which breaks offline builds and adds a
# supply-chain dependency nobody needs for a regular test run.
option(ENABLE_COVERAGE "Enable code coverage instrumentation (downloads codecov cmake modules)" OFF)
if (ENABLE_COVERAGE)
include(codecov)
endif ()

set(TESTS_PROJECT_NAME Cytopia_Tests)

Expand Down Expand Up @@ -114,5 +120,7 @@ set_target_properties(

catch_discover_tests(${TESTS_PROJECT_NAME})

add_coverage(${TESTS_PROJECT_NAME})
coverage_evaluate()
if (ENABLE_COVERAGE)
add_coverage(${TESTS_PROJECT_NAME})
coverage_evaluate()
endif ()