#6491 Don't treat warnings as errors on clang.

This commit is contained in:
Kristian Bendiksen 2020-09-11 19:25:27 +02:00
parent bbff9edc24
commit 5da58fc649

View File

@ -365,10 +365,14 @@ 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
# Treat warnings as errors if asked to do so
if (RESINSIGHT_TREAT_WARNINGS_AS_ERRORS)
set_target_properties(ResInsight PROPERTIES COMPILE_FLAGS "-Wall -Wno-unused-parameter -Wno-reorder -Wno-parentheses -Wno-switch -Werror")
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set_target_properties(ResInsight PROPERTIES COMPILE_FLAGS "-Wall -Wno-unused-parameter -Wno-reorder -Wno-parentheses -Wno-switch -Winconsistent-missing-override")
endif()
endif()