[Bf-blender-cvs] [f1088bd] master: CMake: Ignore paranoid MSVC linker warnings

Sergey Sharybin noreply at git.blender.org
Sat Feb 20 14:07:24 CET 2016


Commit: f1088bd9e16ea033affeade6b14235b787bb31ad
Author: Sergey Sharybin
Date:   Sat Feb 20 12:45:29 2016 +0500
Branches: master
https://developer.blender.org/rBf1088bd9e16ea033affeade6b14235b787bb31ad

CMake: Ignore paranoid MSVC linker warnings

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

M	CMakeLists.txt
M	source/blender/datatoc/CMakeLists.txt

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3b388cc..891539e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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")
 
+		# 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}")
diff --git a/source/blender/datatoc/CMakeLists.txt b/source/blender/datatoc/CMakeLists.txt
index 4c35a94..0f123fb 100644
--- a/source/blender/datatoc/CMakeLists.txt
+++ b/source/blender/datatoc/CMakeLists.txt
@@ -51,6 +51,9 @@ if(NOT WITH_HEADLESS)
 			../blenlib/intern/winstuff_dir.c
 			../../../intern/utfconv/utfconv.c
 		)
+
+		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}")
+		set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
 	endif()
 
 	include_directories(${PNG_INCLUDE_DIRS})




More information about the Bf-blender-cvs mailing list