[Cmake-commits] CMake branch, next, updated. v3.3.1-2862-gdcb2768

Brad King brad.king at kitware.com
Fri Sep 11 11:32:04 EDT 2015


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  dcb2768be80e93b202f0d6a9751211686a63cc22 (commit)
       via  4734df5f79d7101bf425f21065ab5c853bacc388 (commit)
      from  fdf16cf5a7e686e0f95e9b312930f440f0033e47 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dcb2768be80e93b202f0d6a9751211686a63cc22
commit dcb2768be80e93b202f0d6a9751211686a63cc22
Merge: fdf16cf 4734df5
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 11 11:32:04 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Sep 11 11:32:04 2015 -0400

    Merge topic 'fix-windows-version-detection' into next
    
    4734df5f Windows: Set CMAKE_HOST_SYSTEM_VERSION with three components


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4734df5f79d7101bf425f21065ab5c853bacc388
commit 4734df5f79d7101bf425f21065ab5c853bacc388
Author:     Gilles Khouzam <gillesk at microsoft.com>
AuthorDate: Thu Sep 10 13:53:00 2015 -0700
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 11 11:21:53 2015 -0400

    Windows: Set CMAKE_HOST_SYSTEM_VERSION with three components
    
    Call GetVersionEx with OSVERSIONINFOEX instead of OSVERSIONINFO so that
    we can get the dwBuildNumber as a third version component.

diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index ee1b192..33b04ac 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -433,19 +433,22 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
     {
 #if defined(_WIN32) && !defined(__CYGWIN__)
     /* Windows version number data.  */
-    OSVERSIONINFO osvi;
-    ZeroMemory(&osvi, sizeof(osvi));
-    osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+    OSVERSIONINFOEXW osviex;
+    ZeroMemory(&osviex, sizeof(osviex));
+    osviex.dwOSVersionInfoSize = sizeof(osviex);
+
 #ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
 # pragma warning (push)
 # pragma warning (disable:4996)
 #endif
-    GetVersionEx (&osvi);
+    GetVersionExW((OSVERSIONINFOW*)&osviex);
 #ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
 # pragma warning (pop)
 #endif
     std::ostringstream windowsVersionString;
-    windowsVersionString << osvi.dwMajorVersion << "." << osvi.dwMinorVersion;
+    windowsVersionString << osviex.dwMajorVersion << "."
+                         << osviex.dwMinorVersion << "."
+                         << osviex.dwBuildNumber;
     windowsVersionString.str();
     mf->AddDefinition("CMAKE_HOST_SYSTEM_VERSION",
                       windowsVersionString.str().c_str());

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

Summary of changes:
 Source/cmGlobalGenerator.cxx |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list