1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-06-10 11:12:21 +00:00

Put the code coverage stuff behind a build flag.

This commit is contained in:
Brenden Matthews 2022-12-26 11:46:29 -05:00
parent eb1968e43a
commit e6643508f0
No known key found for this signature in database
GPG Key ID: B49ABB7270D9D4FD
3 changed files with 3 additions and 5 deletions

View File

@ -56,13 +56,10 @@ add_subdirectory(3rdparty/toluapp)
set(conky_libs ${conky_libs} toluapp_lib_static)
if(BUILD_TESTS)
if(USING_CLANG)
message(STATUS "Detected clang, enabling test coverage reports")
if(CODE_COVERAGE)
# Enable coverage checks
include(CodeCoverage)
append_coverage_compiler_flags()
else()
message(STATUS "NOT enabling test coverage reports")
endif()
include(Catch)
endif()

View File

@ -84,6 +84,7 @@ option(RELEASE "Build release package" false)
mark_as_advanced(RELEASE)
option(MAINTAINER_MODE "Enable maintainer mode" false)
option(CODE_COVERAGE "Enable code coverage report generation" false)
option(BUILD_DOCS "Build documentation" false)
option(BUILD_EXTRAS "Build extras (includes syntax files for editors)" false)

View File

@ -23,7 +23,7 @@ add_executable(test-conky test-common.cc ${test_srcs})
target_link_libraries(test-conky conky_core)
catch_discover_tests(test-conky)
if(USING_CLANG)
if(CODE_COVERAGE)
set(COVERAGE_LCOV_EXCLUDES
"*/include/c++/v1/*"
"/usr/include/*"