diff options
author | Niyas Sait <niyas.sait@linaro.org> | 2022-05-15 17:15:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-05-19 13:57:54 (GMT) |
commit | af6928ce92783c1583f8f9ae25e50c2991ebd0c0 (patch) | |
tree | 06ed0a61973f13de1a07a4b2a6b785e1a78c2919 /Tests | |
parent | dc3d0b5a0a7d26d43d6cfeb511e224533b5d188f (diff) | |
download | CMake-af6928ce92783c1583f8f9ae25e50c2991ebd0c0.zip CMake-af6928ce92783c1583f8f9ae25e50c2991ebd0c0.tar.gz CMake-af6928ce92783c1583f8f9ae25e50c2991ebd0c0.tar.bz2 |
VS: ARM64 as default toolset architecture for ARM64 host
Visual Studio 2022 17 Preview introduced a native ARM64 toolchain.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake index 5ea02a5..9d5d0b5 100644 --- a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake @@ -6,8 +6,14 @@ if(CMAKE_GENERATOR MATCHES "Visual Studio 1[67]") cmake_host_system_information(RESULT is_64_bit QUERY IS_64BIT) if(is_64_bit) if("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "ARM64") - if(NOT "${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}" STREQUAL "") - message(FATAL_ERROR "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE is not empty as expected.") + if(CMAKE_GENERATOR STREQUAL "Visual Studio 17 2022") + if(NOT "${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}" STREQUAL "ARM64") + message(FATAL_ERROR "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE is not 'ARM64' as expected.") + endif() + else() + if(NOT "${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}" STREQUAL "") + message(FATAL_ERROR "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE is not empty as expected.") + endif() endif() elseif(NOT "${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}" STREQUAL "x64") message(FATAL_ERROR "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE is not 'x64' as expected.") |