diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-01-27 09:59:16 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-01-27 09:59:16 +0100 |
commit | 854485a8e5aa0fc231825e732da53f6d6f0eb489 (patch) | |
tree | aadc2ec00194bb08087b92e1f1ae1783314836cf /CMakeLists.txt | |
parent | b340930ce0eaf467cdf007dbbc7a0e650eeadbf4 (diff) | |
parent | aaf337b83f7e737248bfa6ecdb88b19ea6aae711 (diff) | |
download | ayatana-ido-854485a8e5aa0fc231825e732da53f6d6f0eb489.tar.gz ayatana-ido-854485a8e5aa0fc231825e732da53f6d6f0eb489.tar.bz2 ayatana-ido-854485a8e5aa0fc231825e732da53f6d6f0eb489.zip |
Merge branch 'tari01-pr/cleanup-compile-flags'
Attributes GH PR #57: https://github.com/AyatanaIndicators/ayatana-ido/pull/57
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f6cbff..81525a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,16 @@ else() set(CMAKE_BUILD_TYPE "Release") endif() +if(ENABLE_WERROR) + add_definitions("-Werror") +endif() + +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + add_definitions("-Weverything") +else() + add_definitions("-Wall") +endif() + # Check for prerequisites set(DEPS glib-2.0>=2.58 gtk+-3.0>=3.24) @@ -39,18 +49,6 @@ pkg_check_modules(PROJECT_DEPS REQUIRED ${DEPS}) include(GNUInstallDirs) set(PROJECT_VERSION "0.9.0") -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - - set(COMPILE_FLAGS "${COMPILE_FLAGS} -Weverything") - set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-c++98-compat -Wno-padded") - set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wno-documentation") - -else() - - set(COMPILE_FLAGS "${COMPILE_FLAGS} -Wall") - -endif() - # Make everything add_subdirectory(src) |