[cmake-developers] [Patch] Adding Windows 10 support
Brad King
brad.king at kitware.com
Thu Sep 10 09:39:29 EDT 2015
On 09/09/2015 05:48 PM, Gilles Khouzam wrote:
> Even though GetVersionEx is deprecated,
> it is the right way to get the system version, loading ntdll and
> getting RtlGetVersion is not a good practice as those are private
> APIs that could change.
The change was contributed recently:
Windows: Fix CMAKE_HOST_SYSTEM_VERSION on Windows >= 8.1 (#15674)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4736d53
for this issue:
http://www.cmake.org/Bug/view.php?id=15674
I've re-opened the issue. I would really like to know why MS
deprecated GetVersionEx. The Version Helper APIs are only good
for checking >= level, not getting the actual version. Why
not add the helpers and leave GetVersionEx available too? Why
do we need to add a manifest just to get the OS version? What
is a library author supposed to do when s/he cannot control the
application that will link the library?
FYI, the GetVersionEx documentation page:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724451%28v=vs.85%29.aspx
has a community-mentioned recommendation to use RtlGetVersion.
Thanks,
-Brad
More information about the cmake-developers
mailing list