Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2021-05-31 18:59:29 +0300
committerRay Molenkamp <github@lazydodo.com>2021-05-31 18:59:29 +0300
commitd647e730fbc23233b572594eeb6083978bdb882d (patch)
tree9574e464241c34b76535f6aeb23f50c3ff53a415 /source/blender/bmesh
parentb862916eafc809cc1d93ffc8cdfc48402df30df0 (diff)
Win: Fix warnings as errors being off for bmesh
bf_bmesh historically always build with the /WX flag on windows making all warnings errors, somewhere along the way this has broken for msbuild, ninja still exhibits the expected behaviour. The flags are still passed to the target, and I've validated they are there when the add_library call fires, but they somehow never make it to the generated msbuild project files. I suspect this is a cmake bug but I'm seemingly unable to extract a repro case to file a bug upstream. Setting the same options target_compile_options seems to work, I'm not happy about the unexplained nature of the breakage but this will have to do for now.
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/bmesh/CMakeLists.txt b/source/blender/bmesh/CMakeLists.txt
index c215cf69e3a..92064b3d040 100644
--- a/source/blender/bmesh/CMakeLists.txt
+++ b/source/blender/bmesh/CMakeLists.txt
@@ -182,10 +182,6 @@ set(LIB
extern_rangetree
)
-if(MSVC AND NOT MSVC_CLANG)
- string(APPEND CMAKE_C_FLAGS " /WX /wd4101")
-endif()
-
if(WITH_BULLET)
list(APPEND INC_SYS
${BULLET_INCLUDE_DIRS}
@@ -225,6 +221,10 @@ endif()
blender_add_lib(bf_bmesh "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
+if(MSVC AND NOT MSVC_CLANG)
+ target_compile_options(bf_bmesh PRIVATE /WX /wd4101)
+endif()
+
if(WITH_GTESTS)
set(TEST_SRC
tests/bmesh_core_test.cc