From 44e35e319fd2a9bdcc4027e5b9e72e43d2effde0 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Sun, 6 Feb 2022 16:16:12 +0100 Subject: tests/client/CMakeLists.txt: Only enable coverage reporting if the flag is set for it --- tests/client/CMakeLists.txt | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/tests/client/CMakeLists.txt b/tests/client/CMakeLists.txt index 3d1dc9a..34bef38 100644 --- a/tests/client/CMakeLists.txt +++ b/tests/client/CMakeLists.txt @@ -72,13 +72,14 @@ declare_test(ayatanamenuactiontest) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qmlfiles.h.in ${CMAKE_CURRENT_BINARY_DIR}/qmlfiles.h) -find_package(CoverageReport) -enable_coverage_report( - TARGETS - qmenumodel - FILTER - ${CMAKE_SOURCE_DIR}/tests/* - ${CMAKE_BINARY_DIR}/* - TESTS - ${TESTS} -) +if (ENABLE_COVERAGE) + enable_coverage_report( + TARGETS + qmenumodel + FILTER + ${CMAKE_SOURCE_DIR}/tests/* + ${CMAKE_BINARY_DIR}/* + TESTS + ${TESTS} + ) +endif() -- cgit v1.2.3