浏览代码

Merge topic 'win10-sdk-request-mismatch'

80f59ee6 cmGlobalVisualStudio14Generator: notify when the SDK version doesn't match

Acked-by: Kitware Robot <[email protected]>
Merge-request: !866
Brad King 8 年之前
父节点
当前提交
aa97170f2b
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      Source/cmGlobalVisualStudio14Generator.cxx

+ 7 - 0
Source/cmGlobalVisualStudio14Generator.cxx

@@ -151,6 +151,13 @@ bool cmGlobalVisualStudio14Generator::SelectWindows10SDK(cmMakefile* mf,
     mf->IssueMessage(cmake::FATAL_ERROR, e.str());
     mf->IssueMessage(cmake::FATAL_ERROR, e.str());
     return false;
     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",
   mf->AddDefinition("CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION",
                     this->WindowsTargetPlatformVersion.c_str());
                     this->WindowsTargetPlatformVersion.c_str());
   return true;
   return true;