aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-01-27 09:21:40 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-01-27 09:21:40 +0100
commitcba5f9cb9389a9b77edc009f8e629a9b0e3fdf06 (patch)
tree09f35349daadabf48f5bf414c2c164a2e83951aa /CMakeLists.txt
parentc4846f0938ff544b536fd06becab46bd9ce3dc1c (diff)
parent57a149575e0dd4f00b4ea776781dc3c2fe4f9278 (diff)
downloadayatana-indicator-keyboard-cba5f9cb9389a9b77edc009f8e629a9b0e3fdf06.tar.gz
ayatana-indicator-keyboard-cba5f9cb9389a9b77edc009f8e629a9b0e3fdf06.tar.bz2
ayatana-indicator-keyboard-cba5f9cb9389a9b77edc009f8e629a9b0e3fdf06.zip
Merge branch 'tari01-pr/cleanup-compile-flags'
Attributes GH PR #26: https://github.com/AyatanaIndicators/ayatana-indicator-keyboard/pull/26
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt22
1 files changed, 7 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7af496b6..7185445b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,8 +22,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()
# GNU standard installation directories
@@ -49,21 +54,8 @@ add_custom_target (dist COMMAND bzr export --root=${ARCHIVE_NAME} ${CMAKE_BINARY
add_custom_target (cppcheck COMMAND cppcheck --enable=all -q --error-exitcode=2 --inline-suppr ${CMAKE_SOURCE_DIR}/src)
# Actual building
-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-
- set(C_WARNING_ARGS "${C_WARNING_ARGS} -Weverything")
- set(C_WARNING_ARGS "${C_WARNING_ARGS} -Wno-c++98-compat -Wno-padded")
- set(C_WARNING_ARGS "${C_WARNING_ARGS} -Wno-documentation")
-
-else()
-
- set(C_WARNING_ARGS "${C_WARNING_ARGS} -Wall")
-
-endif()
-
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories (${CMAKE_CURRENT_BINARY_DIR}/include)
-
add_subdirectory(src)
add_subdirectory(data)
add_subdirectory(po)