aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-01-27 15:14:57 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-01-27 15:14:57 +0100
commitcd08e1e357ee4948ac386574d45cde58d1837278 (patch)
tree93fea00084081929e685d174560215bb385671a6 /CMakeLists.txt
parentaed99ec2f8f5b434e92afbb6d9e2dc0b243c7a8a (diff)
parentb1fd511ac5d29ca570f5c01007eb740c7ea7f934 (diff)
downloadayatana-indicator-bluetooth-cd08e1e357ee4948ac386574d45cde58d1837278.tar.gz
ayatana-indicator-bluetooth-cd08e1e357ee4948ac386574d45cde58d1837278.tar.bz2
ayatana-indicator-bluetooth-cd08e1e357ee4948ac386574d45cde58d1837278.zip
Merge branch 'tari01-pr/cleanup-compile-flags'
Attributes GH PR #37: https://github.com/AyatanaIndicators/ayatana-indicator-bluetooth/pull/37
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 7 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d07daff..b8652fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,8 +24,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()
find_package(PkgConfig REQUIRED)
@@ -57,13 +62,6 @@ find_package(GObjectIntrospection 0.9.12)
include_directories(${SOURCE_DIR})
include_directories(${SOURCE_BINARY_DIR})
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-
-add_definitions(
- -Wall
-)
-
configure_file(
"config.h.in"
"${CMAKE_CURRENT_BINARY_DIR}/config.h"