Cycles: refine MSVC version check for /jumptablerdata

MSVC_VER 1937 included 17.7 preview 1 and 2 that didn't support the flag
while developers may be using these versions already because of the
issues with 17.6. We now check for preview 3 specifically.
This commit is contained in:
Xavier Hallade 2023-07-25 19:54:59 +02:00
parent aef3d1c95b
commit b0d1226b6c
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ elseif(WIN32 AND MSVC AND NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# "jumptablerdata" improves performance when there is contention in large switch statements such as in svm.h
# This flag is supported starting with MSVC 17.7 preview 3:
# https://learn.microsoft.com/en-us/cpp/build/reference/jump-table-rdata
if(MSVC_VERSION GREATER_EQUAL 1937)
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.37.32820)
string(APPEND CYCLES_KERNEL_FLAGS " /jumptablerdata")
endif()