mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
The policy added by commit f90c8ab54e (VS: Select latest available
Windows SDK version by default, 2023-04-03, v3.27.0-rc1~206^2~1) applied
only when targeting Windows 10+. Apply it to older versions too.
Fixes: #25170
Issue: #16202
14 lines
584 B
CMake
14 lines
584 B
CMake
if(actual_stdout MATCHES "CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION='([^']+)'")
|
|
set(actual_version "${CMAKE_MATCH_1}")
|
|
elseif(actual_stdout MATCHES "CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=''" AND RunCMake_GENERATOR MATCHES "Visual Studio 1[45] ")
|
|
set(actual_version "8.1")
|
|
else()
|
|
set(RunCMake_TEST_FAILED "No CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION found in output.")
|
|
return()
|
|
endif()
|
|
|
|
if(NOT "${actual_version}" STREQUAL "${expect_version}")
|
|
set(RunCMake_TEST_FAILED "Actual SDK version '${actual_version}' did not match expected '${expect_version}'")
|
|
return()
|
|
endif()
|