aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-02-17 16:41:09 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-02-17 16:41:09 +0100
commit4231e8b00567cac4c350a14e6004d9f8db13a8cd (patch)
tree768725ce6c2ad5d1098b099279e30c594d47d750 /CMakeLists.txt
parent47244a91659255454778d0321cc4354201bbbb8a (diff)
parentcf542e43789ea349ae7a277d127c185afeb0ce14 (diff)
downloadlibayatana-indicator-4231e8b00567cac4c350a14e6004d9f8db13a8cd.tar.gz
libayatana-indicator-4231e8b00567cac4c350a14e6004d9f8db13a8cd.tar.bz2
libayatana-indicator-4231e8b00567cac4c350a14e6004d9f8db13a8cd.zip
Merge branch 'tari01-pr/cleanup-compile-flags'
Attributes GH PR #63: https://github.com/AyatanaIndicators/libayatana-indicator/pull/63
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt29
1 files changed, 11 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9a13569..b5370ec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,8 +19,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
@@ -45,14 +50,14 @@ set(DEPS
)
if (FLAVOUR_GTK3)
set(DEPS
- ${DEPS}
- gtk+-3.0>=3.24
+ ${DEPS}
+ gtk+-3.0>=3.24
)
endif()
if (FLAVOUR_GTK2)
set(DEPS
- ${DEPS}
- gtk+-2.0>=2.18
+ ${DEPS}
+ gtk+-2.0>=2.18
)
endif()
@@ -81,18 +86,6 @@ set(API_VERSION "4")
set(PROJECT_VERSION "0.9.0")
set(PROJECT_NAME "libayatana-indicator")
-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)