Enable -Werror by default except for older GCCs.

master
faluco 5 years ago committed by Andre Puschmann
parent d7433a551b
commit da4f9cde40

@ -466,7 +466,7 @@ if("Ninja" STREQUAL ${CMAKE_GENERATOR})
endif() endif()
# Add -Werror to C/C++ flags for newer compilers # Add -Werror to C/C++ flags for newer compilers
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9 AND NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang") if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
endif() endif()

Loading…
Cancel
Save