summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-04-03 10:56:47 -0400
committerBrad King <brad.king@kitware.com>2023-04-05 12:06:22 -0400
commitb512c53d43b6078c97e06231ccbfa8599a66a4f4 (patch)
treec751b6ede80ef913c3d2091d74f6ebce35589d4b /Tests
parent2f3d945f8382fef4139c7d0c3879f6ff2f3756a0 (diff)
downloadcmake-b512c53d43b6078c97e06231ccbfa8599a66a4f4.tar.gz
VS: Add support for setting WindowsTargetPlatformVersion to 10.0
VS 2019 and above support this value to select a SDK version automatically. Fixes: #21403
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake
index 00a32a21a5..96c2b6b3f4 100644
--- a/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake
+++ b/Tests/RunCMake/GeneratorPlatform/RunCMakeTest.cmake
@@ -39,6 +39,14 @@ if("${RunCMake_GENERATOR}" MATCHES "^Visual Studio (1[4567])( 20[0-9][0-9])?$")
set(RunCMake_GENERATOR_PLATFORM "version=8.1")
run_cmake_with_options(BadVersionPlatform -DCMAKE_SYSTEM_VERSION=8.1)
+ if(NOT RunCMake_GENERATOR MATCHES "^Visual Studio (1[45]) ")
+ set(expect_version "10.0")
+ set(RunCMake_GENERATOR_PLATFORM "version=${expect_version}")
+ set(RunCMake_TEST_VARIANT_DESCRIPTION "-${expect_version}")
+ run_cmake_with_options(VersionExists -DCMAKE_SYSTEM_VERSION=10.0)
+ unset(RunCMake_GENERATOR_PLATFORM)
+ endif()
+
set(kits "")
cmake_host_system_information(RESULT kitsRoot10
QUERY WINDOWS_REGISTRY "HKLM/SOFTWARE/Microsoft/Windows Kits/Installed Roots"