chore(build): add coverage target

This commit is contained in:
Adam Heinermann 2025-08-28 15:18:08 -07:00 committed by fallenoak
parent b8404260b1
commit 104f18a82a
5 changed files with 789 additions and 1 deletions

View file

@ -59,3 +59,8 @@ if(HAS_NO_INVALID_OFFSETOF)
-Wno-invalid-offsetof
)
endif()
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_BUILD_TYPE STREQUAL "Debug")
include(CodeCoverage)
target_compile_options(${PROJECT_NAME} PRIVATE -g -fprofile-arcs -ftest-coverage -O0)
endif()