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 7c03204
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ 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")
endif ()
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 7c03204

Please sign in to comment.