[msvc] treat C4133 as error instead of a warning to mimic gcc's -Werror=incompatible...
authorRay Molenkamp <github@lazydodo.com>
Wed, 27 Sep 2017 16:11:00 +0000 (10:11 -0600)
committerRay Molenkamp <github@lazydodo.com>
Wed, 27 Sep 2017 16:11:00 +0000 (10:11 -0600)
as requested by @campbellbarton and @mano-wii

build_files/cmake/platform/platform_win32_msvc.cmake

index 47dd0edc8ba265ccf5ee98307b7d48fae8294991..26568abd9bf420a2359d2ad18efe1ace498411a0 100644 (file)
@@ -97,8 +97,9 @@ add_definitions(-D_WIN32_WINNT=0x600)
 set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE)
 include(InstallRequiredSystemLibraries)
 
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /nologo /J /Gd /MP /EHsc")
-set(CMAKE_C_FLAGS     "${CMAKE_C_FLAGS} /nologo /J /Gd /MP")
+#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_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
 set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")