diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-04-27 20:13:47 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-04-28 14:50:05 +0200 |
commit | 52f9bbbeb979b980256864cf926feb65138c8758 (patch) | |
tree | c402b0c33ede844c9ffec7e66ff1b63a83ed6f5d | |
parent | 1b140eb5aac99a88a1a75448304364ecc7b47884 (diff) | |
download | ayatana-indicator-session-52f9bbbeb979b980256864cf926feb65138c8758.tar.gz ayatana-indicator-session-52f9bbbeb979b980256864cf926feb65138c8758.tar.bz2 ayatana-indicator-session-52f9bbbeb979b980256864cf926feb65138c8758.zip |
CMakeLists.txt: Rename enable_tests to ENABLE_TESTS (disabled by default) and enable_lcov to ENABLE_COVERAGE (disabled by default).
-rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7202bb6..80a2ec1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,8 +7,15 @@ set (PROJECT_VERSION "0.8.2") set (PACKAGE ${CMAKE_PROJECT_NAME}) set (GETTEXT_PACKAGE "ayatana-indicator-session") -option (enable_tests "Build the package's automatic tests." ON) -option (enable_lcov "Generate lcov code coverage reports." ON) +option (ENABLE_TESTS "Build the package's automatic tests." OFF) +option (ENABLE_COVERAGE "Generate lcov code coverage reports." OFF) + +if(ENABLE_COVERAGE) + set(ENABLE_TESTS ON) + set(CMAKE_BUILD_TYPE "Coverage") +else() + set(CMAKE_BUILD_TYPE "Release") +endif() ## ## GNU standard installation directories @@ -53,12 +60,12 @@ include_directories (${CMAKE_CURRENT_SOURCE_DIR}/src) include_directories (${CMAKE_CURRENT_BINARY_DIR}/src) # testing & coverage -if (${enable_tests}) +if (${ENABLE_TESTS}) set (GTEST_SOURCE_DIR /usr/src/gtest/src) set (GTEST_INCLUDE_DIR ${GTEST_SOURCE_DIR}/..) set (GTEST_LIBS -lpthread) enable_testing () - if (${enable_lcov}) + if (${ENABLE_COVERAGE}) include(GCov) endif () endif () @@ -66,6 +73,6 @@ endif () add_subdirectory (src) add_subdirectory (data) add_subdirectory (po) -if (${enable_tests}) +if (${ENABLE_TESTS}) add_subdirectory (tests) endif () |