aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-28 14:20:34 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-28 14:20:34 +0200
commitf9dcff7b3a42082ad3ba6076991ed8aa7df9b6a8 (patch)
tree7ea3946c69906e091e1880bd36e911b9260e0f1e
parent7d1090761f0eb85ec1323db2093f5a055826f865 (diff)
parent6bddc110467715ab528ee0546512e467b78b434c (diff)
downloadayatana-indicator-bluetooth-f9dcff7b3a42082ad3ba6076991ed8aa7df9b6a8.tar.gz
ayatana-indicator-bluetooth-f9dcff7b3a42082ad3ba6076991ed8aa7df9b6a8.tar.bz2
ayatana-indicator-bluetooth-f9dcff7b3a42082ad3ba6076991ed8aa7df9b6a8.zip
Merge branch 'tari01-pr/add-enable-werror-option'
Attributes GH PR #27: https://github.com/AyatanaIndicators/ayatana-indicator-bluetooth/pull/27
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6a0a6aa..2b680c1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,7 @@ set(PROJECT_VERSION 0.8.2)
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)
@@ -22,6 +23,11 @@ else()
set(CMAKE_BUILD_TYPE "Release")
endif()
+if(ENABLE_WERROR)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
+endif()
+
find_package(PkgConfig REQUIRED)
include(GNUInstallDirs)
include(UseVala)
@@ -94,3 +100,4 @@ endif()
message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}")
message(STATUS "Unit tests: ${ENABLE_TESTS}")
+message(STATUS "Build with -Werror: ${ENABLE_WERROR}")