From b0d1226b6cb16a155ce8a89840f0ff326ea3f4aa Mon Sep 17 00:00:00 2001 From: Xavier Hallade Date: Tue, 25 Jul 2023 19:54:59 +0200 Subject: [PATCH] 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. --- intern/cycles/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt index abe5732316d..91b4d5c0e0d 100644 --- a/intern/cycles/CMakeLists.txt +++ b/intern/cycles/CMakeLists.txt @@ -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()