diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-01-27 15:10:13 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-01-27 15:10:13 +0100 |
commit | 83aa7c3d21e4df4613488892b0f917f3932034cb (patch) | |
tree | 4373547626af614e2cc25dbdeabd094a188ce57f /CMakeLists.txt | |
parent | 69eac3c0291049a76988d076b43c599230473731 (diff) | |
parent | a2743f912739533299d1ceafb55f6ed9fd74d9b5 (diff) | |
download | ayatana-indicator-messages-83aa7c3d21e4df4613488892b0f917f3932034cb.tar.gz ayatana-indicator-messages-83aa7c3d21e4df4613488892b0f917f3932034cb.tar.bz2 ayatana-indicator-messages-83aa7c3d21e4df4613488892b0f917f3932034cb.zip |
Merge branch 'tari01-pr/cleanup-compile-flags'
Attributes GH PR #28: https://github.com/AyatanaIndicators/ayatana-indicator-messages/pull/28
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8dbc9ee..239b05c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,14 +12,6 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) SET(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "..." FORCE) endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) -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() - # Options option(ENABLE_TESTS "Enable all tests and checks" OFF) @@ -34,8 +26,13 @@ else() endif() if(ENABLE_WERROR) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") + add_definitions("-Werror") +endif() + +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + add_definitions("-Weverything") +else() + add_definitions("-Wall") endif() # Check for prerequisites |