summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-09-14 20:20:28 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-09-14 20:20:28 (GMT)
commit050a14f4a7117936b54b4205a5fba70d88cb266a (patch)
treed74ccdf918e337adecbc0ce38c09214bc8b0b911
parent6dad4c25b06ae232c766d76747b080373fb2499d (diff)
parent4734df5f79d7101bf425f21065ab5c853bacc388 (diff)
downloadCMake-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.cxx13
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());