CMake: move MSVC warnings to central location
authorCampbell Barton <ideasman42@gmail.com>
Thu, 28 Sep 2017 02:59:28 +0000 (12:59 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 28 Sep 2017 03:41:54 +0000 (13:41 +1000)
CMakeLists.txt
build_files/cmake/platform/platform_win32_msvc.cmake

index 7a357721387c23268d3e0d95bd8a49b05a73e185..6f43049731b210dae07471a78bd613b9741b714d 100644 (file)
@@ -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
        )
 
index 26568abd9bf420a2359d2ad18efe1ace498411a0..47dd0edc8ba265ccf5ee98307b7d48fae8294991 100644 (file)
@@ -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")