diff options
author | Brad King <brad.king@kitware.com> | 2015-09-14 20:20:28 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-09-14 20:20:28 (GMT) |
commit | 050a14f4a7117936b54b4205a5fba70d88cb266a (patch) | |
tree | d74ccdf918e337adecbc0ce38c09214bc8b0b911 | |
parent | 6dad4c25b06ae232c766d76747b080373fb2499d (diff) | |
parent | 4734df5f79d7101bf425f21065ab5c853bacc388 (diff) | |
download | CMake-050a14f4a7117936b54b4205a5fba70d88cb266a.zip CMake-050a14f4a7117936b54b4205a5fba70d88cb266a.tar.gz CMake-050a14f4a7117936b54b4205a5fba70d88cb266a.tar.bz2 |
Merge topic 'extend-windows-version-detection'
4734df5f Windows: Set CMAKE_HOST_SYSTEM_VERSION with three components
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
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()); |