summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio14Generator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-08-08 18:20:43 (GMT)
committerBrad King <brad.king@kitware.com>2023-08-10 13:57:00 (GMT)
commitae97d82e830c6ddc81808e3f44dad8a47a30bcae (patch)
tree6eb5216786d3167c8ad111d3f0a71cd4b104716b /Source/cmGlobalVisualStudio14Generator.cxx
parent15ff89654b925b74f074ef7e13ed905c3ec38c4b (diff)
downloadCMake-ae97d82e830c6ddc81808e3f44dad8a47a30bcae.zip
CMake-ae97d82e830c6ddc81808e3f44dad8a47a30bcae.tar.gz
CMake-ae97d82e830c6ddc81808e3f44dad8a47a30bcae.tar.bz2
VS: Teach CMAKE_GENERATOR_PLATFORM to support Windows 8.1 SDK selection
Honor an explicit `version=8.1` field value regardless of the Windows target version. Issue: #25170
Diffstat (limited to 'Source/cmGlobalVisualStudio14Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio14Generator.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx
index 8e8062c..506a12a 100644
--- a/Source/cmGlobalVisualStudio14Generator.cxx
+++ b/Source/cmGlobalVisualStudio14Generator.cxx
@@ -167,6 +167,23 @@ bool cmGlobalVisualStudio14Generator::InitializePlatformWindows(cmMakefile* mf)
return this->SelectWindows10SDK(mf);
}
+ if (version == "8.1"_s) {
+ if (this->IsWin81SDKInstalled()) {
+ this->SetWindowsTargetPlatformVersion("8.1", mf);
+ return true;
+ }
+ /* clang-format off */
+ mf->IssueMessage(MessageType::FATAL_ERROR, cmStrCat(
+ "Generator\n"
+ " ", this->GetName(), "\n"
+ "given platform specification containing a\n"
+ " version=8.1\n"
+ "field, but the Windows 8.1 SDK is not installed.\n"
+ ));
+ /* clang-format on */
+ return false;
+ }
+
if (version.empty()) {
/* clang-format off */
mf->IssueMessage(MessageType::FATAL_ERROR, cmStrCat(