mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-16 22:37:30 +08:00
MSVC: Fix MSVC_TOOLSET_VERSION for VS 2022 v143 toolset
This was forgotten in commit 0c7f918fb1
(VS: Update Visual Studio 17
2022 generator for Preview 2, 2021-07-14, v3.21.1~29^2) when the toolset
was first renumbered to `v143`.
Fixes: #22585
This commit is contained in:
@@ -67,7 +67,10 @@ if(NOT MSVC_VERSION)
|
|||||||
message(FATAL_ERROR "MSVC compiler version not detected properly: ${_compiler_version}")
|
message(FATAL_ERROR "MSVC compiler version not detected properly: ${_compiler_version}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC_VERSION GREATER_EQUAL 1920)
|
if(MSVC_VERSION GREATER_EQUAL 1930)
|
||||||
|
# VS 2022 or greater
|
||||||
|
set(MSVC_TOOLSET_VERSION 143)
|
||||||
|
elseif(MSVC_VERSION GREATER_EQUAL 1920)
|
||||||
# VS 2019 or greater
|
# VS 2019 or greater
|
||||||
set(MSVC_TOOLSET_VERSION 142)
|
set(MSVC_TOOLSET_VERSION 142)
|
||||||
elseif(MSVC_VERSION GREATER_EQUAL 1910)
|
elseif(MSVC_VERSION GREATER_EQUAL 1910)
|
||||||
|
Reference in New Issue
Block a user