Commit 5a02afd9 authored by Brad King's avatar Brad King Committed by Kitware Robot

Merge topic 'vs-winrt-default'

e78a0c8e VS: Add option to tell generator that platfrom is WinRT by default
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !2315
parents 28979843 e78a0c8e
......@@ -401,6 +401,7 @@ Variables that Control the Build
/variable/CMAKE_VS_SDK_LIBRARY_WINRT_DIRECTORIES
/variable/CMAKE_VS_SDK_REFERENCE_DIRECTORIES
/variable/CMAKE_VS_SDK_SOURCE_DIRECTORIES
/variable/CMAKE_VS_WINRT_BY_DEFAULT
/variable/CMAKE_WIN32_EXECUTABLE
/variable/CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
/variable/CMAKE_XCODE_ATTRIBUTE_an-attribute
......
CMAKE_VS_WINRT_BY_DEFAULT
-------------------------
Tell :ref:`Visual Studio Generators` for VS 2010 and above that the
target platform compiles as WinRT by default (compiles with ``/ZW``).
This variable is meant to be set by a
:variable:`toolchain file <CMAKE_TOOLCHAIN_FILE>` for such platforms.
......@@ -2571,8 +2571,10 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
}
if (this->MSTools) {
// If we have the VS_WINRT_COMPONENT set then force Compile as WinRT.
if (this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_COMPONENT")) {
// If we have the VS_WINRT_COMPONENT or CMAKE_VS_WINRT_BY_DEFAULT
// set then force Compile as WinRT.
if (this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_COMPONENT") ||
this->Makefile->IsOn("CMAKE_VS_WINRT_BY_DEFAULT")) {
clOptions.AddFlag("CompileAsWinRT", "true");
// For WinRT components, add the _WINRT_DLL define to produce a lib
if (this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment