From ce6f8391533203d8e379b24800a9011760f80e23 Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Thu, 6 Nov 2014 09:28:04 +0100 Subject: [PATCH] Warnings level were not correct with Clang --- src/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c2db2e6b..89584da8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,14 +1,19 @@ file(GLOB_RECURSE INC_FILES ../include/*.hpp) file(GLOB_RECURSE SRC_FILES *.cpp) -if(CMAKE_COMPILER_IS_GNUCXX) +message("> ${CMAKE_CXX_COMPILER}") +message("> ${CMAKE_CXX_COMPILER_ID}") + +if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") add_definitions( -Wall -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization + -Werrors -Wextra + -Wfatal-errors -Wformat=2 -Winit-self -Wlogical-op