[cmake-developers] confusing documentation: VS_WINRT_EXTENSIONS

Daniel Pfeifer daniel at pfeifer-mail.de
Tue Sep 3 03:39:09 EDT 2013


2013/9/2 Brad King <brad.king at kitware.com>:
> On 09/02/2013 11:42 AM, Daniel Pfeifer wrote:
>> The target property VS_WINRT_EXTENSIONS is documented as: "Can be set
>> to enable C++/CX language extensions."
>> Is that really what this property does?
> [snip]
>> So my question again: Does VS_WINRT_EXTENSIONS really enable C++/CX? I hope not.
>
> This was contributed here:
>
>  http://www.cmake.org/Bug/view.php?id=12930
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9e01aefd
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c9ae472
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f0ae381c
>
> I don't know more than that.

According to http://www.cmake.org/Bug/view.php?id=12930#c30721,
WindowsAppContainer will not pass /ZW to the command line.
Hence, setting VS_WINRT_EXTENSIONS will not enable C++/CX and the
documentation is incorrect. But that is good.

Maybe also the name of that property is misleading. It might be better
to use the same name that is used as a define, which means
WINAPI_FAMILY as property with the possible values
WINAPI_PARTITION_APP and WINAPI_PARTITION_DESKTOP (and maybe more,
once Microsoft adds new partitions of the winapi).

It is also important that WINAPI_PARTITION_DESKTOP is not supported
when compiling for ARM. Here, WINAPI_PARTITION_APP should be the
default, especially for the initial compile checks.

Visual Studio generators should set WindowsAppContainer if
WINAPI_FAMILY is set to WINAPI_PARTITION_APP.
Makefile generators should pass  -DWINAPI_FAMILY=${WINAPI_FAMILY} to
the command line.

cheers, Daniel



More information about the cmake-developers mailing list