[Bf-blender-cvs] [1703a8fb333] master: Build: Add TBB define to BMesh module
Hans Goudey
noreply at git.blender.org
Thu Oct 13 21:49:08 CEST 2022
Commit: 1703a8fb33393f6064d99282ebbaa568dd94e4ae
Author: Hans Goudey
Date: Thu Oct 13 12:45:55 2022 -0500
Branches: master
https://developer.blender.org/rB1703a8fb33393f6064d99282ebbaa568dd94e4ae
Build: Add TBB define to BMesh module
Allows using BLI_task.hh to write multithreaded code.
===================================================================
M source/blender/bmesh/CMakeLists.txt
===================================================================
diff --git a/source/blender/bmesh/CMakeLists.txt b/source/blender/bmesh/CMakeLists.txt
index 0efa5f73ae4..77223ecd1c7 100644
--- a/source/blender/bmesh/CMakeLists.txt
+++ b/source/blender/bmesh/CMakeLists.txt
@@ -207,6 +207,22 @@ if(WITH_GMP)
)
endif()
+if(WITH_TBB)
+ add_definitions(-DWITH_TBB)
+ if(WIN32)
+ # TBB includes Windows.h which will define min/max macros
+ # that will collide with the stl versions.
+ add_definitions(-DNOMINMAX)
+ endif()
+ list(APPEND INC_SYS
+ ${TBB_INCLUDE_DIRS}
+ )
+
+ list(APPEND LIB
+ ${TBB_LIBRARIES}
+ )
+endif()
+
blender_add_lib(bf_bmesh "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
if(MSVC AND NOT MSVC_CLANG)
More information about the Bf-blender-cvs
mailing list