CMake/Windows: Blacklist MSVC 17.6.x

Code gen bugs can happen, ad usually they can be worked around
MSVC 17.6 is not one of those cases:

59% tests passed, 120 tests failed out of 296

There really is no other choice than to refuse to build with this
compiler. Alternates that CAN be used are both 17.5 and the current
17.7 preview builds.

Upstream tracking ticket kindly submitted by @deadpin :
https://developercommunity.visualstudio.com/t/vs176/10293729

If a compiler is released in the 17.6.x series that has the bug
fixed, we can contract the range of blacklisted compiler versions
to cover just the affected range, for now however all of 17.6 marked
bad
This commit is contained in:
Ray Molenkamp 2023-05-17 16:40:51 -06:00
parent 112a5196f6
commit 96867a713b

@ -39,8 +39,14 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
set(WITH_WINDOWS_STRIPPED_PDB OFF)
endif()
else()
if(WITH_BLENDER AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.28.29921) # MSVC 2019 16.9.16
message(FATAL_ERROR "Compiler is unsupported, MSVC 2019 16.9.16 or newer is required for building blender.")
if(WITH_BLENDER)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.28.29921) # MSVC 2019 16.9.16
message(FATAL_ERROR "Compiler is unsupported, MSVC 2019 16.9.16 or newer is required for building blender.")
endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.36.32532 AND # MSVC 2022 17.6.0 has a bad codegen
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.37.32705) # But it is fixed in 2022 17.7 preview 1
message(FATAL_ERROR "Compiler is unsupported, MSVC 2022 17.6.x has codegen issues and cannot be used to build blender. Please use MSVC 17.5 for the time being.")
endif()
endif()
endif()