On 01/27/2015 02:58 PM, Robert Goulet wrote:
> the generator is essentially the same for both Win32 and WinRT
> except for a very few properties.
>
> This allow me to set the target property VS_WINRT_DISABLE
I think this can work as a feature of this specific generator.
Let's restrict it to executable targets for now. Also, rather
than a new property, let's define that the VS_WINRT_COMPONENT
property may be *explicitly* set to a false value to disable
WinRT settings on Store targets. On Windows Store it should
be an error to set VS_WINRT_COMPONENT explicitly to false for
anything but an EXECUTABLE target.
> - (target->IsImported() || !this->Makefile->IsOn("CMAKE_CROSSCOMPILING")))
> + (target->IsImported() || !this->Makefile->IsOn("CMAKE_CROSSCOMPILING")
> || target->GetPropertyAsBool("VS_WINRT_DISABLE")))
That leaks knowledge of the VS generator features into code
that is not specific to the generator. Instead you could add
a method to cmTarget like "IsHostExecutable" that can answer
the above question. Internally it could ask the global gen
for help, which could then be a vtable dispatch to special
knowledge in the VS >= 10 generators.
Thanks,
-Brad
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers