CMake: Ignore paranoid MSVC linker warnings
[blender.git] / CMakeLists.txt
index 3b388ccd5f8b47ab1c119a2d255bf5fab2102794..891539e0b34ca9cd7505254f4436b344226c8671 100644 (file)
@@ -1288,6 +1288,10 @@ elseif(WIN32)
 
                set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib /NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib")
 
 
                set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcmrt.lib /NODEFAULTLIB:msvcurt.lib /NODEFAULTLIB:msvcrtd.lib")
 
+               # Ignore meaningless for us linker warnings.
+               set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} /ignore:4049 /ignore:4217 /ignore:4221")
+               set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
+
                # MSVC only, Mingw doesnt need
                if(CMAKE_CL_64)
                        set(PLATFORM_LINKFLAGS "/MACHINE:X64 /OPT:NOREF ${PLATFORM_LINKFLAGS}")
                # MSVC only, Mingw doesnt need
                if(CMAKE_CL_64)
                        set(PLATFORM_LINKFLAGS "/MACHINE:X64 /OPT:NOREF ${PLATFORM_LINKFLAGS}")