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
This commit is contained in:
Ray molenkamp 2021-07-07 10:55:27 -06:00
parent 6b0869039a
commit fb98f22ddd
1 changed files with 5 additions and 0 deletions

View File

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