From 59283b0aac2dc12e955a3dd9604cc129f19ef74a Mon Sep 17 00:00:00 2001 From: Robert Tari Date: Thu, 13 Jan 2022 12:55:54 +0100 Subject: CMakeLists.txt: Clean up compilation flags --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd3f3e8..7e11db6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,8 +25,13 @@ if(ENABLE_TESTS) 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() # Standard install paths -- cgit v1.2.3