diff options
author | Robert Tari <robert@tari.in> | 2020-07-25 02:11:19 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-07-25 13:16:04 +0200 |
commit | 0b63b9cfa784add2ce5b8e3b6100c1f73c8dcbed (patch) | |
tree | c15cfd2f52ff280e7b942d82135acff58a570f19 | |
parent | 653137a083c64d2003263351d3c5da2ecc7bb64a (diff) | |
download | ayatana-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.
-rw-r--r-- | CMakeLists.txt | 20 |
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 () |