diff options
author | Ray Molenkamp <github@lazydodo.com> | 2021-07-07 19:55:27 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2021-07-07 19:55:27 +0300 |
commit | fb98f22ddd5c814c01facacb48284acdfe8099fd (patch) | |
tree | 7e9666193a34c84ba0cbc9c5122afdade9c78069 | |
parent | 6b0869039a40685e2f4b128b3d08b12c1f3fea75 (diff) |
MSVC: Fix build issue with TBB
TBB includes in windows.h which will by
default define min/max macro's by default,
which collide with stl's min/mac functions.
this change instructs windows.h not to
add the offending macros
-rw-r--r-- | source/blender/nodes/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index 4bfd75c4545..ec060de916b 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -420,6 +420,11 @@ if(WITH_TBB) ${TBB_INCLUDE_DIRS} ) 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() endif() if(WITH_IMAGE_OPENEXR) |