From e16522c0deb232c06397b1b42f6783a84ce01c2b Mon Sep 17 00:00:00 2001 From: John Turpish Date: Thu, 17 Oct 2024 11:51:08 -0400 Subject: [PATCH] tricky unused exclude patterns. --- cmake/CodeCoverage.cmake | 1 + library/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/CodeCoverage.cmake b/cmake/CodeCoverage.cmake index 4d451db3..946e4a48 100644 --- a/cmake/CodeCoverage.cmake +++ b/cmake/CodeCoverage.cmake @@ -274,6 +274,7 @@ function(setup_target_for_coverage_lcov) set(LCOV_BASELINE_CMD ${LCOV_PATH} ${Coverage_LCOV_ARGS} --gcov-tool ${GCOV_PATH} -c --no-external -i -d . --ignore-errors mismatch + --ignore-errors unused -b ${BASEDIR} -o ${Coverage_NAME}.base ) # Run tests diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index e8bc62f2..5009b4cb 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -262,8 +262,8 @@ if(GTest_FOUND AND IN_WORKSPACE) DEPENDENCIES run_tests EXECUTABLE $ EXCLUDE - */*/*test.cc - src/smhasher/*.cc + ${unit_test_sources} + src/smhasher/MurmurHash3.cc ) else() message(WARNING "Cannot provide coverage report without lcov")