Skip to content

Commit

Permalink
feat(cmake): adding more flags for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperFola committed Sep 24, 2024
1 parent 031c225 commit 875c0c3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ if (ARK_TESTS)
target_compile_features(unittests PRIVATE cxx_std_20)
target_compile_definitions(unittests PRIVATE ARK_TESTS_ROOT="${CMAKE_CURRENT_SOURCE_DIR}/")

if (ARK_COVERAGE AND NOT WIN32)
target_compile_options(unittests PRIVATE -coverage)
target_link_options(unittests PRIVATE -coverage)
target_compile_options(ArkReactor PRIVATE -coverage)
target_link_options(ArkReactor PRIVATE -coverage)
if (ARK_COVERAGE AND CMAKE_COMPILER_IS_CLANG)
target_compile_options(unittests PRIVATE -coverage -fcoverage-mapping -fprofile-instr-generate)
target_link_options(unittests PRIVATE -coverage -fcoverage-mapping -fprofile-instr-generate)
target_compile_options(ArkReactor PRIVATE -coverage -fcoverage-mapping -fprofile-instr-generate)
target_link_options(ArkReactor PRIVATE -coverage -fcoverage-mapping -fprofile-instr-generate)

# find required tools
find_program(LCOV lcov REQUIRED)
Expand Down

0 comments on commit 875c0c3

Please sign in to comment.