Fix: Build error with clang on windows.

A bug in llvm < 9.0.1 causes the compiler to crash when
openmp is enabled. Since mantaflow uses tbb we can safely
disable this flag temporarily for this module.

Reviewed By: sebbas

Differential Revision: https://developer.blender.org/D6446
This commit is contained in:
Ray molenkamp 2019-12-20 10:50:40 -07:00
parent 39112a4f7b
commit a2d6dfc026
1 changed files with 8 additions and 0 deletions

View File

@ -23,6 +23,14 @@
#
# ***** END GPL LICENSE BLOCK *****
# Mantaflow triggers a clang-cl compiler error with versions before 9.0.1
# Since mantaflow does not appear to be using OpenMP at this point in time,
# disable the flag for now. See https://bugs.llvm.org/show_bug.cgi?id=43175 for details.
if(MSVC_CLANG AND WITH_OPENMP AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0.1")
remove_cc_flag("-fopenmp")
endif()
set(MANTAVERSION "0.12")
add_definitions(-DWITH_FLUID=1)