diff options
author | Robert Tari <robert@tari.in> | 2020-07-24 01:16:24 +0200 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2020-07-24 01:21:35 +0200 |
commit | 628f1d4eb426019d6c72e6fce7d7ef33930c4a34 (patch) | |
tree | e31b061b349ee7ff9a7d5f563809f30d87667f79 | |
parent | a69917053d1ea75e6ad307950763de506bb6520f (diff) | |
download | ayatana-indicator-sound-628f1d4eb426019d6c72e6fce7d7ef33930c4a34.tar.gz ayatana-indicator-sound-628f1d4eb426019d6c72e6fce7d7ef33930c4a34.tar.bz2 ayatana-indicator-sound-628f1d4eb426019d6c72e6fce7d7ef33930c4a34.zip |
Added option to disable Tests/Coverage
-rw-r--r-- | CMakeLists.txt | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 949b4fb..5bbd6f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,8 @@ find_package(PkgConfig REQUIRED) include(GNUInstallDirs) include(UseVala) +option (enable_tests "Build the package's automatic tests." ON) + # Workaround for libexecdir on debian if (EXISTS "/etc/debian_version") set(CMAKE_INSTALL_LIBEXECDIR "${CMAKE_INSTALL_LIBDIR}") @@ -55,10 +57,6 @@ include_directories(${SOUNDSERVICE_INCLUDE_DIRS}) pkg_check_modules(UNITY_API libunity-api>=0.1.3) -pkg_check_modules( - TEST REQUIRED - dbustest-1>=15.04.0 -) include_directories(${TEST_INCLUDE_DIRS}) find_package(Vala 0.20) @@ -84,11 +82,14 @@ add_subdirectory(data) add_subdirectory(src) add_subdirectory(po) -enable_testing() -add_subdirectory(tests) -find_package(CoverageReport) -ENABLE_COVERAGE_REPORT( - TARGETS ${COVERAGE_TARGETS} - TESTS ${COVERAGE_TEST_TARGETS} - FILTER /usr/include ${CMAKE_BINARY_DIR}/* -) +if (${enable_tests}) + pkg_check_modules(TEST REQUIRED dbustest-1>=15.04.0) + enable_testing() + add_subdirectory(tests) + find_package(CoverageReport) + ENABLE_COVERAGE_REPORT( + TARGETS ${COVERAGE_TARGETS} + TESTS ${COVERAGE_TEST_TARGETS} + FILTER /usr/include ${CMAKE_BINARY_DIR}/* + ) +endif () |