]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Set the highest level of compilation warnings.
authorArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Tue, 12 May 2020 06:06:37 +0000 (09:06 +0300)
committerArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Tue, 12 May 2020 06:06:37 +0000 (09:06 +0300)
CMakeCommon/Common.cmake

index 1292e21b17ff276b15ce593a1b6f303d022198eb..4ad9e74b0381cccbc75022a004aa29f10a0cf8e7 100644 (file)
@@ -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()