From af824b09c7b3eb4c70dccf116ee0e3790466a352 Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Wed, 17 Feb 2021 12:23:01 -0700 Subject: MSVC: Suppress C4251 in OpenVDB/Mantaflow All headers in the svn libraries should be building with /W0 however MSVC 16.8/16.9 has broken this functionality making OpenVDB emit lots of warnings. The breakage was reported [1] in august to MS but they still have not gotten around to addressing the issue. This change explicitly suppresses C4251 in the module that emitted these warnings. As the warning is useful in other parts of blender a localized approach is taken rather than a global suppression. [1] https://developercommunity.visualstudio.com/content/problem/1167590/bug.html --- extern/mantaflow/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extern/mantaflow/CMakeLists.txt b/extern/mantaflow/CMakeLists.txt index c1fa13420b8..3220a45bef4 100644 --- a/extern/mantaflow/CMakeLists.txt +++ b/extern/mantaflow/CMakeLists.txt @@ -133,6 +133,14 @@ if(WITH_OPENVDB) list(APPEND LIB ${OPENVDB_LIBRARIES} ) + if(WIN32) + # OpenVDB emits lots of these, they should be suppressed through other + # means but MSVC 16.8/16.9 has broken this functionality, so C4251 is + # suppressed here explicitly. See + # https://developercommunity.visualstudio.com/content/problem/1167590/bug.html + # for details. + string(APPEND CMAKE_CXX_FLAGS " /wd4251") + endif() endif() set(SRC -- cgit v1.2.3