[cmake-developers] [Patch] Adding Windows 10 support

Brad King brad.king at kitware.com
Thu Sep 10 15:04:08 EDT 2015


On 09/10/2015 02:37 PM, Gilles Khouzam wrote:
> I don't know that deprecating the API and making it require a
> manifest was a better solution, but it does require more
> intentional work on the developer before just using the API.

The API should not be deprecated if there is any use case for
which no replacement is available.  The manifest approach does
raise the bar, but it also makes no sense for library code that
wants to know the Windows version, and still requires use of
a deprecated API.  MS should have just provided the version
helper APIs and updated the GetVersionEx docs to refer to them
as preferred.

> Added support for manifest files...(VisualStudio 10 generator only)

We need it to be supported on all generators.  Otherwise when one
builds CMake with another generator (like our release binaries)
it will not be able to detect the proper version of Windows.
The Makefile and Ninja generators already have some support for
running the manifest tool while linking a binary.

How might one detect Windows 10 in a .cmd (.bat) script?  Perhaps
we can query something externally instead of using GetVersionEx.
Of course having custom manifest support will be nice for apps
anyway.

> I can split it up in multiple patches if that makes it easier.

Yes, please.  That makes review and future reading of history easier
because we see a commit message associated with each corresponding
set of changes.

Please order the patches so that no existing functionality breaks at
any step and everything compiles.

Thanks,
-Brad



More information about the cmake-developers mailing list