From da02d47069a4c0492b45310e9236c41d7755b8bc Mon Sep 17 00:00:00 2001 From: Chris Burel Date: Fri, 16 Jul 2021 16:58:11 -0700 Subject: [PATCH] Re-enable using non-officially-supported generators when building with MSVC Signed-off-by: Chris Burel --- cmake/Platform/Common/MSVC/Configurations_msvc.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/Platform/Common/MSVC/Configurations_msvc.cmake b/cmake/Platform/Common/MSVC/Configurations_msvc.cmake index d61558bd49..156f6bbfd9 100644 --- a/cmake/Platform/Common/MSVC/Configurations_msvc.cmake +++ b/cmake/Platform/Common/MSVC/Configurations_msvc.cmake @@ -6,13 +6,15 @@ # # +set(minimum_supported_toolset 142) +if(MSVC_TOOLSET_VERSION VERSION_LESS ${minimum_supported_toolset}) + message(FATAL_ERROR "MSVC toolset ${MSVC_TOOLSET_VERSION} is too old, minimum supported toolset is ${minimum_supported_toolset}") +endif() +unset(minimum_supported_toolset) + include(cmake/Platform/Common/Configurations_common.cmake) include(cmake/Platform/Common/VisualStudio_common.cmake) -if(NOT CMAKE_GENERATOR MATCHES "Visual Studio 1[6-7]") - message(FATAL_ERROR "Generator ${CMAKE_GENERATOR} not supported") -endif() - # Verify that it wasn't invoked with an unsupported target/host architecture. Currently only supports x64/x64 if(CMAKE_VS_PLATFORM_NAME AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "x64") message(FATAL_ERROR "${CMAKE_VS_PLATFORM_NAME} target architecture is not supported, it must be 'x64'")