summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@qt.io>2024-02-28 14:28:29 +0100
committerRobert Griebl <robert.griebl@qt.io>2024-02-28 16:21:01 +0100
commitffa055620a0eedae9ea97b3925922aa61186340f (patch)
tree1087fa5aa17d7a21caa9962eee0bbc09d180f390
parenta8479d1039ecc9de0e9f36efd905d1d299328d27 (diff)
coverage: make sure lcov version 2 is available
Pick-to: 6.7 6.6 6.5 Change-Id: I4cca67109e058c4a8d2e2795a236af55fbe395ff Reviewed-by: Dominik Holland <dominik.holland@qt.io>
-rw-r--r--CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aba73fe6..d1b49247 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,6 +66,7 @@ if(IF_COVERAGE)
add_custom_target(check_coverage
COMMAND sh -c 'which lcov >/dev/null || { echo "The lcov tool is not available." && exit 2 \; }'
COMMAND sh -c 'which genhtml >/dev/null || { echo "The genhtml tool is not available." && exit 2 \; }'
+ COMMAND sh -c 'lcov --version | grep -q "^lcov: LCOV version 2\." || { echo "The lcov tool must be version 2." && exit 2 \; }'
COMMAND find . \\\( -name \"*.gcov-info\" -o -name \"*.gcda\" \\\) -print0 | xargs -0 rm -f
COMMAND lcov -keep-going -c -i -d . ${LCOV_EXTRA_ARGS} --rc branch_coverage=1 --rc geninfo_auto_base=1 -o "${CMAKE_CURRENT_BINARY_DIR}/base.gcov-info"
COMMAND ctest --test-dir tests/auto --verbose --repeat until-pass:3