From 2deeccb4160d3a36bd3aed9e437c4a967da34daf Mon Sep 17 00:00:00 2001 From: faluco Date: Wed, 6 May 2020 17:38:04 +0200 Subject: [PATCH] Re-enable -Werror. --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cdabc9660..a87d5b5df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -466,10 +466,10 @@ if("Ninja" STREQUAL ${CMAKE_GENERATOR}) endif() # Add -Werror to C/C++ flags for newer compilers -#if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) -# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") -# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") -#endif() +if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") +endif() message(STATUS "CMAKE_C_FLAGS is ${CMAKE_C_FLAGS}") message(STATUS "CMAKE_CXX_FLAGS is ${CMAKE_CXX_FLAGS}")