diff options
| -rw-r--r-- | .lcovrc | 2 | ||||
| -rw-r--r-- | cmake/Modules/EnableCoverage.cmake | 10 |
2 files changed, 6 insertions, 6 deletions
@@ -2,6 +2,6 @@ exclude = /usr/include/* exclude = build/bht/_deps/* exclude = tests/* exclude = **.tests.cpp -exclude = kapi/include/kapi/* +exclude = kapi/kapi/* ignore_errors = unused,empty,inconsistent
\ No newline at end of file diff --git a/cmake/Modules/EnableCoverage.cmake b/cmake/Modules/EnableCoverage.cmake index 9602869..20be368 100644 --- a/cmake/Modules/EnableCoverage.cmake +++ b/cmake/Modules/EnableCoverage.cmake @@ -1,9 +1,9 @@ -function (enable_coverage TARGET) - target_compile_options("${TARGET}" PRIVATE +function(enable_coverage TARGET) + target_compile_options("${TARGET}" PUBLIC "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:-fcondition-coverage>" "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:--coverage>" ) - target_link_libraries("${TARGET}" PRIVATE - "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:gcov>" + target_link_options("${TARGET}" PUBLIC + "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:--coverage>" ) -endfunction ()
\ No newline at end of file +endfunction() |
