[Bf-blender-cvs] [0ae1a1ed488] master: CMake: move MSVC warnings to central location

Campbell Barton noreply at git.blender.org
Thu Sep 28 05:31:39 CEST 2017


Commit: 0ae1a1ed48863403fed1e2de72313d231bd56f56
Author: Campbell Barton
Date:   Thu Sep 28 12:59:28 2017 +1000
Branches: master
https://developer.blender.org/rB0ae1a1ed48863403fed1e2de72313d231bd56f56

CMake: move MSVC warnings to central location

===================================================================

M	CMakeLists.txt
M	build_files/cmake/platform/platform_win32_msvc.cmake

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7a357721387..6f43049731b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1472,6 +1472,7 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC")
 		"/wd4800"  # forcing value to bool 'true' or 'false'
 		# errors:
 		"/we4013"  # 'function' undefined; assuming extern returning int
+		"/we4133"  # incompatible pointer types
 		"/we4431"  # missing type specifier - int assumed
 	)
 
diff --git a/build_files/cmake/platform/platform_win32_msvc.cmake b/build_files/cmake/platform/platform_win32_msvc.cmake
index 26568abd9bf..47dd0edc8ba 100644
--- a/build_files/cmake/platform/platform_win32_msvc.cmake
+++ b/build_files/cmake/platform/platform_win32_msvc.cmake
@@ -97,9 +97,8 @@ add_definitions(-D_WIN32_WINNT=0x600)
 set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
 include(InstallRequiredSystemLibraries)
 
-#4133 treat incompatible pointer types as error
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /nologo /J /Gd /MP /EHsc /we4133")
-set(CMAKE_C_FLAGS     "${CMAKE_C_FLAGS} /nologo /J /Gd /MP /we4133")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /nologo /J /Gd /MP /EHsc")
+set(CMAKE_C_FLAGS     "${CMAKE_C_FLAGS} /nologo /J /Gd /MP")
 
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
 set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")



More information about the Bf-blender-cvs mailing list