diff options
author | Brad King <brad.king@kitware.com> | 2019-02-20 13:54:10 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-02-20 13:54:36 (GMT) |
commit | fcdd6efb724439502e9e0fa95a6c0ccb4d32a5a5 (patch) | |
tree | 2f783b8b4f57d6e31e0cba0371d6a88110786680 /Source/cmGlobalVisualStudio14Generator.cxx | |
parent | 85d779442bbc9376a0c71f0dc8f42d0df52c11d4 (diff) | |
parent | 4dab8e69bd46b6aa85a97c4d23e9d894fc5fbcf6 (diff) | |
download | CMake-fcdd6efb724439502e9e0fa95a6c0ccb4d32a5a5.zip CMake-fcdd6efb724439502e9e0fa95a6c0ccb4d32a5a5.tar.gz CMake-fcdd6efb724439502e9e0fa95a6c0ccb4d32a5a5.tar.bz2 |
Merge topic 'vs-win-sdk'
4dab8e69bd VS: Tell VS 2019 to use Windows SDK 8.1 explicitly when needed
35bf9ded3b VS: Factor out a method to set the Windows SDK version internally
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2989
Diffstat (limited to 'Source/cmGlobalVisualStudio14Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio14Generator.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx index 2d54c33..6509b56 100644 --- a/Source/cmGlobalVisualStudio14Generator.cxx +++ b/Source/cmGlobalVisualStudio14Generator.cxx @@ -158,14 +158,22 @@ bool cmGlobalVisualStudio14Generator::SelectWindows10SDK(cmMakefile* mf, bool required) { // Find the default version of the Windows 10 SDK. - this->WindowsTargetPlatformVersion = this->GetWindows10SDKVersion(); - if (required && this->WindowsTargetPlatformVersion.empty()) { + std::string const version = this->GetWindows10SDKVersion(); + if (required && version.empty()) { std::ostringstream e; e << "Could not find an appropriate version of the Windows 10 SDK" << " installed on this machine"; mf->IssueMessage(MessageType::FATAL_ERROR, e.str()); return false; } + this->SetWindowsTargetPlatformVersion(version, mf); + return true; +} + +void cmGlobalVisualStudio14Generator::SetWindowsTargetPlatformVersion( + std::string const& version, cmMakefile* mf) +{ + this->WindowsTargetPlatformVersion = version; if (!cmSystemTools::VersionCompareEqual(this->WindowsTargetPlatformVersion, this->SystemVersion)) { std::ostringstream e; @@ -175,7 +183,6 @@ bool cmGlobalVisualStudio14Generator::SelectWindows10SDK(cmMakefile* mf, } mf->AddDefinition("CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION", this->WindowsTargetPlatformVersion.c_str()); - return true; } bool cmGlobalVisualStudio14Generator::SelectWindowsStoreToolset( |