aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-04-21 20:52:10 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-04-21 20:57:03 +0200
commit0573203124f66f826a0f6b06262f7610b00f0fb6 (patch)
tree3469e4ca1d3973d8c6faa57aa85567ac5811d97c /CMakeLists.txt
parentab041b778f0a559e75f6d9a8b10ba899e7576616 (diff)
downloadayatana-ido-0573203124f66f826a0f6b06262f7610b00f0fb6.tar.gz
ayatana-ido-0573203124f66f826a0f6b06262f7610b00f0fb6.tar.bz2
ayatana-ido-0573203124f66f826a0f6b06262f7610b00f0fb6.zip
{tests/,}CMakeLists.txt: Add ENABLE_COVERAGE build option.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cb0cce1..7d2726b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,14 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
option(ENABLE_TESTS "Enable all tests and checks" OFF)
+option(ENABLE_COVERAGE "Enable coverage reports (includes enabling all tests and checks)" OFF)
+
+if(ENABLE_COVERAGE)
+ set(ENABLE_TESTS ON)
+ set(CMAKE_BUILD_TYPE "Coverage")
+else()
+ set(CMAKE_BUILD_TYPE "Release")
+endif()
# Check for prerequisites