mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 06:59:01 -06:00
Merge topic 'vs2022' into release-3.21
38c8f2c4e3IRSL: Add discovery of VS 2022 v143 toolset redistributablesf01ea7e391MSVC: Fix MSVC_TOOLSET_VERSION for VS 2022 v143 toolset Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6497
This commit is contained in:
@@ -222,8 +222,12 @@ if(MSVC)
|
||||
set(_MSVC_IDE_VERSION "")
|
||||
if(MSVC_VERSION GREATER_EQUAL 2000)
|
||||
message(WARNING "MSVC ${MSVC_VERSION} not yet supported.")
|
||||
elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 143)
|
||||
elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 144)
|
||||
message(WARNING "MSVC toolset v${MSVC_TOOLSET_VERSION} not yet supported.")
|
||||
elseif(MSVC_TOOLSET_VERSION EQUAL 143)
|
||||
set(MSVC_REDIST_NAME VC142)
|
||||
set(_MSVC_DLL_VERSION 140)
|
||||
set(_MSVC_IDE_VERSION 17)
|
||||
elseif(MSVC_TOOLSET_VERSION EQUAL 142)
|
||||
set(MSVC_REDIST_NAME VC142)
|
||||
set(_MSVC_DLL_VERSION 140)
|
||||
@@ -264,7 +268,7 @@ if(MSVC)
|
||||
if(NOT vs VERSION_LESS 15)
|
||||
set(_vs_redist_paths "")
|
||||
# The toolset and its redistributables may come with any VS version 15 or newer.
|
||||
set(_MSVC_IDE_VERSIONS 16 15)
|
||||
set(_MSVC_IDE_VERSIONS 17 16 15)
|
||||
foreach(_vs_ver ${_MSVC_IDE_VERSIONS})
|
||||
set(_vs_glob_redist_paths "")
|
||||
cmake_host_system_information(RESULT _vs_dir QUERY VS_${_vs_ver}_DIR) # undocumented query
|
||||
|
||||
@@ -67,7 +67,10 @@ if(NOT MSVC_VERSION)
|
||||
message(FATAL_ERROR "MSVC compiler version not detected properly: ${_compiler_version}")
|
||||
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
|
||||
set(MSVC_TOOLSET_VERSION 142)
|
||||
elseif(MSVC_VERSION GREATER_EQUAL 1910)
|
||||
|
||||
Reference in New Issue
Block a user