Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2021-05-28 16:57:21 +0300
committerRay Molenkamp <github@lazydodo.com>2021-05-28 16:57:21 +0300
commit418888f1c9a3c3ca8facc04d271d48ad37e5f5b2 (patch)
tree281c6d9c941f9601327379ec24bc0ec0e7957362
parentbdac47f8d4f4bf4c413e9f82feb822fdd96ceca7 (diff)
MSVC: Fix build error with 16.10/11
Not entirely sure why this was not an issue for 16.9 but TBB includes the Windows.h header which by default will define min and max macro's These collide with the stl versions in <algorithm> This patch requests Windows.h not to define the problematic macro's, resolving the conflict.
-rw-r--r--source/blender/modifiers/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt
index 91327b97fe4..0138dd0c3ad 100644
--- a/source/blender/modifiers/CMakeLists.txt
+++ b/source/blender/modifiers/CMakeLists.txt
@@ -195,7 +195,11 @@ 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}
)