From 81db2957f86a86c96263dba63664d5d97f9937d5 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 4 May 2021 13:04:58 +0200 Subject: CMakeLists.txt: Move coverage report generation macro into basefolder's CMakeLists.txt file. With the previous approach, only coverage of the tests/ subfolder was reported (which always should be 100%). With this change, also coverage of the files in src/ is reported. --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index b039352..70b509f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,15 @@ if (ENABLE_TESTS) enable_testing() add_subdirectory(example) add_subdirectory(tests) + # coverage + if (ENABLE_COVERAGE) + find_package(CoverageReport) + ENABLE_COVERAGE_REPORT( + TARGETS "ayatana-ido3-0.4" + TESTS "gtest-menuitems" + FILTER /usr/include ${CMAKE_BINARY_DIR}/* + ) + endif() endif() # Display config info -- cgit v1.2.3