summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/VS10Project
diff options
context:
space:
mode:
authorPetr Polezhaev <petr.polezhaev@larian.com>2019-12-03 13:00:41 (GMT)
committerBrad King <brad.king@kitware.com>2019-12-16 18:46:59 (GMT)
commit557ea4614ee9352cbfff7798033175230a39e0e0 (patch)
tree6cb99eab4c4114e9767241c9d255d74eea4c2ad4 /Tests/RunCMake/VS10Project
parent7bcef355bfa25e8d9d2dbc015b04831a7cf8c5a9 (diff)
downloadCMake-557ea4614ee9352cbfff7798033175230a39e0e0.zip
CMake-557ea4614ee9352cbfff7798033175230a39e0e0.tar.gz
CMake-557ea4614ee9352cbfff7798033175230a39e0e0.tar.bz2
VS: Change CMAKE_VS_WINRT_BY_DEFAULT to not implicitly enable WinRT
Original behaviour would unconditionally enable WinRT for all projects so source file flag generation code can acknowledge WinRT being present and disable it for C language source files. An unintentional result of that approach is that WinRT is enabled for ALL projects, including C++ projects/source files with no way to disable it Instead use `CMAKE_VS_WINRT_BY_DEFAULT` as a hint that the platform is WinRT-by-default and set global `CompileAsWinRT` flag to `false` unless it was explicitly requested by either `WINRT_COMPONENT` option or `/ZW` compilation option - similar to what Windows Phone/Windows Store platform logic does In case WinRT compilation is enabled for a project by either of aforementioned methods, C language source file override logic will still kick in and disable CompileAsWinRT for C source files Fixes: #20063
Diffstat (limited to 'Tests/RunCMake/VS10Project')
-rw-r--r--Tests/RunCMake/VS10Project/VsWinRTByDefault-check.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/Tests/RunCMake/VS10Project/VsWinRTByDefault-check.cmake b/Tests/RunCMake/VS10Project/VsWinRTByDefault-check.cmake
index d352946..15bbaf2 100644
--- a/Tests/RunCMake/VS10Project/VsWinRTByDefault-check.cmake
+++ b/Tests/RunCMake/VS10Project/VsWinRTByDefault-check.cmake
@@ -57,9 +57,9 @@ macro(checkCompileAsWinRT projectPath)
endif()
endmacro()
-checkCompileAsWinRT("${RunCMake_TEST_BINARY_DIR}/noFlagOnlyC.vcxproj" GLOBAL true OVERRIDES_DISABLE empty.c)
-checkCompileAsWinRT("${RunCMake_TEST_BINARY_DIR}/noFlagMixedCAndCxx.vcxproj" GLOBAL true OVERRIDES_DISABLE empty.c)
-checkCompileAsWinRT("${RunCMake_TEST_BINARY_DIR}/noFlagOnlyCxx.vcxproj" GLOBAL true)
+checkCompileAsWinRT("${RunCMake_TEST_BINARY_DIR}/noFlagOnlyC.vcxproj" GLOBAL false)
+checkCompileAsWinRT("${RunCMake_TEST_BINARY_DIR}/noFlagMixedCAndCxx.vcxproj" GLOBAL false)
+checkCompileAsWinRT("${RunCMake_TEST_BINARY_DIR}/noFlagOnlyCxx.vcxproj" GLOBAL false)
checkCompileAsWinRT("${RunCMake_TEST_BINARY_DIR}/flagOnlyC.vcxproj" GLOBAL true OVERRIDES_DISABLE empty.c)
checkCompileAsWinRT("${RunCMake_TEST_BINARY_DIR}/flagMixedCAndCxx.vcxproj" GLOBAL true OVERRIDES_DISABLE empty.c)