Treat warnings as errors on new gcc versions

This commit is contained in:
Kristian Bendiksen 2020-05-18 19:09:07 +02:00
parent 9c8fe15d28
commit d5a950d67c

View File

@ -392,6 +392,10 @@ endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set_target_properties(ResInsight PROPERTIES COMPILE_FLAGS "-Wall -Wno-unused-parameter -Wno-reorder -Wno-parentheses -Wno-switch")
# Treat warnings as errors on new gcc versions
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.2)
set_target_properties(ResInsight PROPERTIES COMPILE_FLAGS "-Wall -Wno-unused-parameter -Wno-reorder -Wno-parentheses -Wno-switch -Werror")
endif()
endif()