From 4a4aaabfa90273b4db36c131cdff320e44c8bec6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 4 Apr 2015 10:37:00 +1100 Subject: [PATCH] CMake: treat inline C files as headers --- source/blender/blenlib/CMakeLists.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index e614a2a0663..eceec2ab850 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}")