From 82f20e9bee0cd782311a1dd14dc373733f8066b1 Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Thu, 13 Jan 2022 15:31:22 +0100 Subject: CMakeLists.txt: Clean up compilation flags --- CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 47cf270..4fdda11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,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 @@ -61,8 +66,6 @@ include_directories (${DEPS_INCLUDE_DIRS}) find_package (GObjectIntrospection QUIET) find_package (Vala QUIET) -set(CC_WARNING_ARGS " -Wall -pedantic -Wextra -Wno-missing-field-initializers") - add_subdirectory(src) add_subdirectory(data) add_subdirectory(po) -- cgit v1.2.3