[Bf-blender-cvs] [4a4aaab] master: CMake: treat inline C files as headers

Campbell Barton noreply at git.blender.org
Sat Apr 4 01:51:41 CEST 2015


Commit: 4a4aaabfa90273b4db36c131cdff320e44c8bec6
Author: Campbell Barton
Date:   Sat Apr 4 10:37:00 2015 +1100
Branches: master
https://developer.blender.org/rB4a4aaabfa90273b4db36c131cdff320e44c8bec6

CMake: treat inline C files as headers

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

M	source/blender/blenlib/CMakeLists.txt

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

diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt
index e614a2a..eceec2a 100644
--- a/source/blender/blenlib/CMakeLists.txt
+++ b/source/blender/blenlib/CMakeLists.txt
@@ -205,10 +205,14 @@ if(WIN32)
 	)
 endif()
 
-blender_add_lib(bf_blenlib "${SRC}" "${INC}" "${INC_SYS}")
+# no need to compile object files for inline headers.
+set_source_files_properties(
+	intern/math_base_inline.c
+	intern/math_color_blend_inline.c
+	intern/math_color_inline.c
+	intern/math_geom_inline.c
+	intern/math_vector_inline.c
+	PROPERTIES HEADER_FILE_ONLY TRUE
+)
 
-if(MSVC)
-	# Quiet warning about inline math library files that do not export symbols.
-	# (normally you'd exclude from project, but we still want to see the files in MSVC)
-	set_target_properties(bf_blenlib PROPERTIES STATIC_LIBRARY_FLAGS /ignore:4221)
-endif()
+blender_add_lib(bf_blenlib "${SRC}" "${INC}" "${INC_SYS}")




More information about the Bf-blender-cvs mailing list