summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-01-21 18:06:30 (GMT)
committerBrad King <brad.king@kitware.com>2016-01-21 18:06:30 (GMT)
commit7b8bec7a944acbebb71adf6ef1d6a561a3444076 (patch)
treea7474fe6a6326faf28990204166fb94839a81465
parent6506dcaa20a7d17737517dbcba6102be564d8d66 (diff)
parentd7e863c1c1f4962f589e53b42a87a66cf5ab00b7 (diff)
downloadCMake-7b8bec7a944acbebb71adf6ef1d6a561a3444076.zip
CMake-7b8bec7a944acbebb71adf6ef1d6a561a3444076.tar.gz
CMake-7b8bec7a944acbebb71adf6ef1d6a561a3444076.tar.bz2
Merge branch 'vs-win10-sdk' into release
-rw-r--r--Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst3
-rw-r--r--Source/cmGlobalVisualStudio14Generator.cxx9
-rw-r--r--Source/cmGlobalVisualStudio14Generator.h2
3 files changed, 8 insertions, 6 deletions
diff --git a/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst b/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst
index 6392849..e0be3a4 100644
--- a/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst
+++ b/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst
@@ -8,4 +8,5 @@ specification of a target Windows version to select a corresponding SDK.
The :variable:`CMAKE_SYSTEM_VERSION` variable may be set to specify a
version. Otherwise CMake computes a default version based on the Windows
SDK versions available. The chosen Windows target version number is provided
-in ``CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION``.
+in ``CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION``. If no Windows 10 SDK
+is available this value will be empty.
diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx
index 83499f1..2f266cd 100644
--- a/Source/cmGlobalVisualStudio14Generator.cxx
+++ b/Source/cmGlobalVisualStudio14Generator.cxx
@@ -115,7 +115,7 @@ bool cmGlobalVisualStudio14Generator::InitializeWindows(cmMakefile* mf)
{
if (cmHasLiteralPrefix(this->SystemVersion, "10.0"))
{
- return this->SelectWindows10SDK(mf);
+ return this->SelectWindows10SDK(mf, false);
}
return true;
}
@@ -143,17 +143,18 @@ bool cmGlobalVisualStudio14Generator::InitializeWindowsStore(cmMakefile* mf)
}
if (cmHasLiteralPrefix(this->SystemVersion, "10.0"))
{
- return this->SelectWindows10SDK(mf);
+ return this->SelectWindows10SDK(mf, true);
}
return true;
}
//----------------------------------------------------------------------------
-bool cmGlobalVisualStudio14Generator::SelectWindows10SDK(cmMakefile* mf)
+bool cmGlobalVisualStudio14Generator::SelectWindows10SDK(cmMakefile* mf,
+ bool required)
{
// Find the default version of the Windows 10 SDK.
this->WindowsTargetPlatformVersion = this->GetWindows10SDKVersion();
- if (this->WindowsTargetPlatformVersion.empty())
+ if (required && this->WindowsTargetPlatformVersion.empty())
{
std::ostringstream e;
e << "Could not find an appropriate version of the Windows 10 SDK"
diff --git a/Source/cmGlobalVisualStudio14Generator.h b/Source/cmGlobalVisualStudio14Generator.h
index 76c15d9..57e6284 100644
--- a/Source/cmGlobalVisualStudio14Generator.h
+++ b/Source/cmGlobalVisualStudio14Generator.h
@@ -39,7 +39,7 @@ protected:
bool IsWindowsStoreToolsetInstalled() const;
virtual const char* GetIDEVersion() { return "14.0"; }
- virtual bool SelectWindows10SDK(cmMakefile* mf);
+ virtual bool SelectWindows10SDK(cmMakefile* mf, bool required);
// Used to verify that the Desktop toolset for the current generator is
// installed on the machine.