From a7c80f64fe4a4a4db216bcb9b117ae233ada1157 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Tue, 11 Jan 2022 16:55:52 +0100 Subject: CMakeLists.txt: Clean up compilation flags --- CMakeLists.txt | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'CMakeLists.txt') 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" -- cgit v1.2.3