diff options
author | Brad King <brad.king@kitware.com> | 2019-12-17 16:09:21 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-12-17 16:11:24 (GMT) |
commit | 37a30f228a196da9af71ab6655aa2d6e510d02f1 (patch) | |
tree | 4dc175964e256d7856d589d3fb31a98e0c390038 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 2d17101269159ce9280588f95f1925408bee44e1 (diff) | |
parent | 557ea4614ee9352cbfff7798033175230a39e0e0 (diff) | |
download | CMake-37a30f228a196da9af71ab6655aa2d6e510d02f1.zip CMake-37a30f228a196da9af71ab6655aa2d6e510d02f1.tar.gz CMake-37a30f228a196da9af71ab6655aa2d6e510d02f1.tar.bz2 |
Merge topic 'fix-vs-winrt-by-default'
557ea4614e VS: Change CMAKE_VS_WINRT_BY_DEFAULT to not implicitly enable WinRT
7bcef355bf Vs: Add test for VS_WINRT_BY_DEFAULT
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4127
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 6e3dfc3..f707bb4 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2829,10 +2829,8 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( } if (this->MSTools) { - // 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")) { + // If we have the VS_WINRT_COMPONENT set then force Compile as WinRT + if (this->GeneratorTarget->GetPropertyAsBool("VS_WINRT_COMPONENT")) { clOptions.AddFlag("CompileAsWinRT", "true"); // For WinRT components, add the _WINRT_DLL define to produce a lib if (this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY || @@ -2840,7 +2838,8 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( clOptions.AddDefine("_WINRT_DLL"); } } else if (this->GlobalGenerator->TargetsWindowsStore() || - this->GlobalGenerator->TargetsWindowsPhone()) { + this->GlobalGenerator->TargetsWindowsPhone() || + this->Makefile->IsOn("CMAKE_VS_WINRT_BY_DEFAULT")) { if (!clOptions.IsWinRt()) { clOptions.AddFlag("CompileAsWinRT", "false"); } |