From d5a950d67c493b71a48553f4a42fac709c03a3d3 Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Mon, 18 May 2020 19:09:07 +0200 Subject: [PATCH] Treat warnings as errors on new gcc versions --- ApplicationCode/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ApplicationCode/CMakeLists.txt b/ApplicationCode/CMakeLists.txt index eb28d2d228..c633123cee 100644 --- a/ApplicationCode/CMakeLists.txt +++ b/ApplicationCode/CMakeLists.txt @@ -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()