Skip to content

Commit

Permalink
Cannot enable coverage with sanitizers
Browse files Browse the repository at this point in the history
  • Loading branch information
JackyWoo committed May 21, 2024
1 parent 9fb3e43 commit d79f342
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsized-deallocation")
option(WITH_COVERAGE "Profile the resulting binary/binaries" OFF)

if (WITH_COVERAGE)
if (SANITIZE)
message (FATAL_ERROR "Cannot enable coverage with sanitizers"
set(COMPILER_FLAGS "${COMPILER_FLAGS} -fprofile-instr-generate -fcoverage-mapping")
# If we want to disable coverage for specific translation units
set(WITHOUT_COVERAGE "-fno-profile-instr-generate -fno-coverage-mapping")
Expand Down

0 comments on commit d79f342

Please sign in to comment.