diff options
author | Ray Molenkamp <github@lazydodo.com> | 2021-05-28 16:57:21 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2021-05-28 16:57:21 +0300 |
commit | 418888f1c9a3c3ca8facc04d271d48ad37e5f5b2 (patch) | |
tree | 281c6d9c941f9601327379ec24bc0ec0e7957362 /source/blender/modifiers/CMakeLists.txt | |
parent | bdac47f8d4f4bf4c413e9f82feb822fdd96ceca7 (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.
Diffstat (limited to 'source/blender/modifiers/CMakeLists.txt')
-rw-r--r-- | source/blender/modifiers/CMakeLists.txt | 6 |
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} ) |