[Cmake-commits] CMake branch, next, updated. v3.4.1-1870-ge920fa6

Brad King brad.king at kitware.com
Fri Jan 8 10:07:49 EST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  e920fa671ac31373a04c2613bd80ec147b3bd3e7 (commit)
       via  c173e37fa32b9d212cc6305f5e6dc881ba34e140 (commit)
      from  946910862468bef655e28378fc0bf74caa70dc7a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e920fa671ac31373a04c2613bd80ec147b3bd3e7
commit e920fa671ac31373a04c2613bd80ec147b3bd3e7
Merge: 9469108 c173e37
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Jan 8 10:07:48 2016 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Jan 8 10:07:48 2016 -0500

    Merge topic 'vs-win10-sdk' into next
    
    c173e37f VS: Do not select a partial Windows 10 SDK folder (#15831)


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c173e37fa32b9d212cc6305f5e6dc881ba34e140
commit c173e37fa32b9d212cc6305f5e6dc881ba34e140
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 7 14:54:32 2016 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Jan 8 10:05:40 2016 -0500

    VS: Do not select a partial Windows 10 SDK folder (#15831)
    
    Skip SDK candidate folders that do not contain <um/windows.h> as they
    are not full SDKs.

diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx
index 41825fb..803b500 100644
--- a/Source/cmGlobalVisualStudio14Generator.cxx
+++ b/Source/cmGlobalVisualStudio14Generator.cxx
@@ -229,6 +229,16 @@ cmGlobalVisualStudio14Generator::IsWindowsStoreToolsetInstalled() const
     win10SDK, cmSystemTools::KeyWOW64_32);
 }
 
+#if defined(_WIN32) && !defined(__CYGWIN__)
+struct NoWindowsH
+{
+  bool operator()(std::string const& p)
+    {
+    return !cmSystemTools::FileExists(p + "/um/windows.h", true);
+    }
+};
+#endif
+
 //----------------------------------------------------------------------------
 std::string cmGlobalVisualStudio14Generator::GetWindows10SDKVersion()
 {
@@ -252,6 +262,12 @@ std::string cmGlobalVisualStudio14Generator::GetWindows10SDKVersion()
   std::string path = win10Root + "Include/*";
   // Grab the paths of the different SDKs that are installed
   cmSystemTools::GlobDirs(path, sdks);
+
+  // Skip SDKs that do not contain <um/windows.h> because that indicates that
+  // only the UCRT MSIs were installed for them.
+  sdks.erase(std::remove_if(sdks.begin(), sdks.end(), NoWindowsH()),
+             sdks.end());
+
   if (!sdks.empty())
     {
     // Only use the filename, which will be the SDK version.

-----------------------------------------------------------------------

Summary of changes:
 Source/cmGlobalVisualStudio14Generator.cxx |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list