From: Artem Zhidkov Date: Tue, 12 May 2020 06:06:37 +0000 (+0300) Subject: Set the highest level of compilation warnings. X-Git-Tag: V9_5_0b1~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5785146dd375b1ce7494dfee8047a05af8917822;p=modules%2Fshaper.git Set the highest level of compilation warnings. --- diff --git a/CMakeCommon/Common.cmake b/CMakeCommon/Common.cmake index 1292e21b1..4ad9e74b0 100644 --- a/CMakeCommon/Common.cmake +++ b/CMakeCommon/Common.cmake @@ -57,3 +57,14 @@ IF(UNIX) #MESSAGE(STATUS "linker flags are: " ${CMAKE_SHARED_LINKER_FLAGS}) ENDIF(CMAKE_COMPILER_IS_GNUCC) ENDIF(UNIX) + +# Set highest warnings level +IF(MSVC) + IF(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") + string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") + endif() +ELSE() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") +ENDIF()