From 80f59ee6028aaaa9019e3d1eac0c018039a7f22a Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 17 May 2017 14:23:53 -0400 Subject: 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. --- Source/cmGlobalVisualStudio14Generator.cxx | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- cgit v0.12