mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 13:50:10 -05:00
Merge branch 'backport-vs2026' into vs2026
This commit is contained in:
@@ -19,6 +19,8 @@ namespace CSharp
|
||||
+ "Visual Studio"
|
||||
#elif PlatformToolsetv143
|
||||
+ "Visual Studio"
|
||||
#elif PlatformToolsetv145
|
||||
+ "Visual Studio"
|
||||
#else
|
||||
+ "unknown"
|
||||
#endif
|
||||
@@ -53,6 +55,8 @@ namespace CSharp
|
||||
+ "2019"
|
||||
#elif PlatformToolsetv143
|
||||
+ "2022"
|
||||
#elif PlatformToolsetv145
|
||||
+ "2026"
|
||||
#else
|
||||
+ "9999"
|
||||
#endif
|
||||
|
||||
@@ -247,8 +247,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 144)
|
||||
elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 146)
|
||||
message(WARNING "MSVC toolset v${MSVC_TOOLSET_VERSION} not yet supported.")
|
||||
elseif(MSVC_TOOLSET_VERSION EQUAL 145)
|
||||
set(MSVC_REDIST_NAME VC145)
|
||||
set(_MSVC_DLL_VERSION 140)
|
||||
set(_MSVC_IDE_VERSION 18)
|
||||
elseif(MSVC_TOOLSET_VERSION EQUAL 143)
|
||||
set(MSVC_REDIST_NAME VC143)
|
||||
set(_MSVC_DLL_VERSION 140)
|
||||
@@ -293,7 +297,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 17 16 15)
|
||||
set(_MSVC_IDE_VERSIONS 18 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
|
||||
|
||||
@@ -181,7 +181,7 @@ macro(__windows_compiler_gnu_abi lang)
|
||||
|
||||
# Query the VS Installer tool for locations of VS 2017 and above.
|
||||
set(_vs_installer_paths "")
|
||||
foreach(vs RANGE 17 15 -1) # change the first number to the largest supported version
|
||||
foreach(vs RANGE 18 15 -1) # change the first number to the largest supported version
|
||||
cmake_host_system_information(RESULT _vs_dir QUERY VS_${vs}_DIR)
|
||||
if(_vs_dir)
|
||||
list(APPEND _vs_installer_paths "${_vs_dir}/VC/Auxiliary/Build")
|
||||
|
||||
@@ -61,7 +61,10 @@ if(NOT MSVC_VERSION)
|
||||
message(FATAL_ERROR "MSVC compiler version not detected properly: ${_compiler_version}")
|
||||
endif()
|
||||
|
||||
if(MSVC_VERSION GREATER_EQUAL 1930)
|
||||
if(MSVC_VERSION GREATER_EQUAL 1950)
|
||||
# VS 2026 or greater
|
||||
set(MSVC_TOOLSET_VERSION 145)
|
||||
elseif(MSVC_VERSION GREATER_EQUAL 1930)
|
||||
# VS 2022 or greater
|
||||
set(MSVC_TOOLSET_VERSION 143)
|
||||
elseif(MSVC_VERSION GREATER_EQUAL 1920)
|
||||
|
||||
Reference in New Issue
Block a user