aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2020-07-25 02:11:19 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-07-25 13:16:04 +0200
commit0b63b9cfa784add2ce5b8e3b6100c1f73c8dcbed (patch)
treec15cfd2f52ff280e7b942d82135acff58a570f19 /CMakeLists.txt
parent653137a083c64d2003263351d3c5da2ecc7bb64a (diff)
downloadayatana-indicator-power-0b63b9cfa784add2ce5b8e3b6100c1f73c8dcbed.tar.gz
ayatana-indicator-power-0b63b9cfa784add2ce5b8e3b6100c1f73c8dcbed.tar.bz2
ayatana-indicator-power-0b63b9cfa784add2ce5b8e3b6100c1f73c8dcbed.zip
Added option to disable Testing/Coverage
Fixes AyatanaIndicators/ayatana-indicator-power#3.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt20
1 files changed, 12 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ed78b11..be68ef4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,6 +6,8 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
set(PROJECT_VERSION "2.0.94")
set(PACKAGE ${CMAKE_PROJECT_NAME})
+option (enable_tests "Build the package's automatic tests." ON)
+
##
## GNU standard installation directories
##
@@ -82,11 +84,13 @@ add_subdirectory(po)
# testing & coverage
-enable_testing ()
-add_subdirectory(tests)
-find_package(CoverageReport)
-ENABLE_COVERAGE_REPORT(
- TARGETS ${SERVICE_LIB} ${SERVICE_EXEC}
- TESTS ${COVERAGE_TEST_TARGETS}
- FILTER /usr/include ${CMAKE_BINARY_DIR}/*
-)
+if (${enable_tests})
+ enable_testing ()
+ add_subdirectory(tests)
+ find_package(CoverageReport)
+ ENABLE_COVERAGE_REPORT(
+ TARGETS ${SERVICE_LIB} ${SERVICE_EXEC}
+ TESTS ${COVERAGE_TEST_TARGETS}
+ FILTER /usr/include ${CMAKE_BINARY_DIR}/*
+ )
+endif ()