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.
This commit is contained in:
Ray molenkamp 2021-05-28 07:57:21 -06:00
parent bdac47f8d4
commit 418888f1c9
1 changed files with 5 additions and 1 deletions

View File

@ -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}
)