summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2017-05-17 18:23:53 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2017-07-13 12:10:57 (GMT)
commit80f59ee6028aaaa9019e3d1eac0c018039a7f22a (patch)
treeaa479d0b93666fb81afb81f3dba12909cc79aeea /Source
parent1fda77d45565c3a819e6149597c3a194d9ccd0bb (diff)
downloadCMake-80f59ee6028aaaa9019e3d1eac0c018039a7f22a.zip
CMake-80f59ee6028aaaa9019e3d1eac0c018039a7f22a.tar.gz
CMake-80f59ee6028aaaa9019e3d1eac0c018039a7f22a.tar.bz2
cmGlobalVisualStudio14Generator: notify when the SDK version doesn't match
When requesting an SDK version which is not suitable (e.g., missing `windows.h`), CMake will use the next-best SDK version. Output a message when CMake chooses something different than the requested SDK version. See #16895.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalVisualStudio14Generator.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx
index c8cf02c..e2120b8 100644
--- a/Source/cmGlobalVisualStudio14Generator.cxx
+++ b/Source/cmGlobalVisualStudio14Generator.cxx
@@ -151,6 +151,13 @@ bool cmGlobalVisualStudio14Generator::SelectWindows10SDK(cmMakefile* mf,
mf->IssueMessage(cmake::FATAL_ERROR, e.str());
return false;
}
+ if (!cmSystemTools::VersionCompareEqual(this->WindowsTargetPlatformVersion,
+ this->SystemVersion)) {
+ std::ostringstream e;
+ e << "Selecting Windows SDK version " << this->WindowsTargetPlatformVersion
+ << " to target Windows " << this->SystemVersion << ".";
+ mf->DisplayStatus(e.str().c_str(), -1);
+ }
mf->AddDefinition("CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION",
this->WindowsTargetPlatformVersion.c_str());
return true;