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
This commit is contained in:
Ray Molenkamp
2021-02-17 12:23:01 -07:00
parent f29a1d87e8
commit af824b09c7

View File

@@ -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