diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-10 21:56:57 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-10 21:56:57 +0200 |
commit | b4927b1299862b01a751e929152f3b2b24444f06 (patch) | |
tree | 3250abd36c8cdb5f7297f408a3b1cd381270780a | |
parent | 879e27ea02c995e6a61ef28775f5da6ccfb450d1 (diff) | |
parent | c68353a5ede324c23caeaccb35948f51b01a4ae2 (diff) | |
download | ayatana-ido-b4927b1299862b01a751e929152f3b2b24444f06.tar.gz ayatana-ido-b4927b1299862b01a751e929152f3b2b24444f06.tar.bz2 ayatana-ido-b4927b1299862b01a751e929152f3b2b24444f06.zip |
Merge branch 'tari01-pr/add-enable-werror-option'
Attributes GH PR #45: https://github.com/AyatanaIndicators/ayatana-ido/pull/45
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 70b509f..e8776cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,8 +7,17 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) SET(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "..." FORCE) endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) +# Options option(ENABLE_TESTS "Enable all tests and checks" OFF) option(ENABLE_COVERAGE "Enable coverage reports (includes enabling all tests and checks)" OFF) +option(ENABLE_WERROR "Treat all build warnings as errors" OFF) + +if(ENABLE_COVERAGE) + set(ENABLE_TESTS ON) + set(CMAKE_BUILD_TYPE "Coverage") +else() + set(CMAKE_BUILD_TYPE "Release") +endif() if(ENABLE_COVERAGE) set(ENABLE_TESTS ON) @@ -66,3 +75,4 @@ endif() message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}") message(STATUS "Unit tests: ${ENABLE_TESTS}") +message(STATUS "Build with -Werror: ${ENABLE_WERROR}") |