summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiyas Sait <niyas.sait@linaro.org>2022-05-10 15:29:37 (GMT)
committerNiyas Sait <niyas.sait@linaro.org>2022-05-11 17:13:25 (GMT)
commit834422e0752514a06c868e3ec2df190171e8affe (patch)
treeae95aa2417572b0c46dd1820a110c544509ff175
parentcf6235719b7d5889ead0676e598b56bf677bd0ba (diff)
downloadCMake-834422e0752514a06c868e3ec2df190171e8affe.zip
CMake-834422e0752514a06c868e3ec2df190171e8affe.tar.gz
CMake-834422e0752514a06c868e3ec2df190171e8affe.tar.bz2
Tests: Fix test failures for Windows Arm64 platforms
-rw-r--r--Tests/CMakeLists.txt10
-rw-r--r--Tests/RunCMake/AutoExportDll/AutoExport.cmake6
-rw-r--r--Tests/RunCMake/CMakeLists.txt4
-rw-r--r--Tests/RunCMake/CommandLine/Envgen-G-implicit-platform-stdout.txt2
-rw-r--r--Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake7
-rw-r--r--Tests/RunCMake/VS10Project/VsCSharpCompilerOpts-check.cmake4
-rw-r--r--Tests/RunCMake/VS10Project/VsCSharpDefines-check.cmake4
7 files changed, 25 insertions, 12 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 9a1cf69..e1dd260 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -431,8 +431,10 @@ if(BUILD_TESTING)
if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|[9][0-9])")
ADD_TEST_MACRO(CSharpOnly CSharpOnly)
- ADD_TEST_MACRO(CSharpLinkToCxx CSharpLinkToCxx)
- ADD_TEST_MACRO(CSharpLinkFromCxx CSharpLinkFromCxx)
+ if(NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64")
+ ADD_TEST_MACRO(CSharpLinkToCxx CSharpLinkToCxx)
+ ADD_TEST_MACRO(CSharpLinkFromCxx CSharpLinkFromCxx)
+ endif()
ADD_TEST_MACRO(CSharpWin32GenEx CSharpWin32GenEx)
set_tests_properties(CSharpWin32GenEx PROPERTIES
PASS_REGULAR_EXPRESSION "Target \"CSharpWin32GenEx\" has a generator expression in its\n WIN32_EXECUTABLE property\\. This is not supported on managed executables\\."
@@ -2109,6 +2111,7 @@ if(BUILD_TESTING)
if(MSVC AND NOT MSVC_VERSION LESS 1310
AND (NOT CMAKE_GENERATOR MATCHES "Visual Studio 9 "
OR CMAKE_SIZEOF_VOID_P EQUAL 4)
+ AND (NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64")
)
ADD_TEST_MACRO(VSMASM VSMASM)
endif()
@@ -2119,7 +2122,8 @@ if(BUILD_TESTING)
endif()
if(NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio 9 "
- AND NOT CMAKE_GENERATOR_TOOLSET STREQUAL "v90")
+ AND NOT CMAKE_GENERATOR_TOOLSET STREQUAL "v90"
+ AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64")
ADD_TEST_MACRO(VSWindowsFormsResx VSWindowsFormsResx)
ADD_TEST_MACRO(VSManagedCustomCommand)
endif()
diff --git a/Tests/RunCMake/AutoExportDll/AutoExport.cmake b/Tests/RunCMake/AutoExportDll/AutoExport.cmake
index 85eff7e..dbcf4b8 100644
--- a/Tests/RunCMake/AutoExportDll/AutoExport.cmake
+++ b/Tests/RunCMake/AutoExportDll/AutoExport.cmake
@@ -6,7 +6,8 @@ add_library(objlib OBJECT objlib.c)
set_property(TARGET objlib PROPERTY POSITION_INDEPENDENT_CODE 1)
add_library(autoexport SHARED hello.cxx world.cxx foo.c $<TARGET_OBJECTS:objlib>)
add_library(autoexport3 SHARED cppCLI.cxx)
-if(MSVC AND NOT MSVC_VERSION VERSION_LESS 1600)
+if(MSVC AND NOT MSVC_VERSION VERSION_LESS 1600
+ AND NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64")
set_property(TARGET autoexport3 PROPERTY COMMON_LANGUAGE_RUNTIME "")
endif()
@@ -15,7 +16,8 @@ if(MSVC)
set_target_properties(say PROPERTIES ENABLE_EXPORTS ON)
add_library(autoexport_for_exec SHARED hello2.c)
target_link_libraries(autoexport_for_exec say)
- if(NOT MSVC_VERSION VERSION_LESS 1600)
+ if(NOT MSVC_VERSION VERSION_LESS 1600 AND
+ NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64")
enable_language(ASM_MASM)
target_sources(autoexport PRIVATE nop.asm)
set_property(SOURCE nop.asm PROPERTY COMPILE_FLAGS /safeseh)
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index dd540ea..1db589f 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -959,7 +959,9 @@ endif()
if(${CMAKE_GENERATOR} MATCHES "Visual Studio ([^9]|9[0-9])")
add_RunCMake_test(CSharpCustomCommand)
- add_RunCMake_test(CSharpReferenceImport)
+ if(NOT CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64")
+ add_RunCMake_test(CSharpReferenceImport)
+ endif()
endif()
add_RunCMake_test("CTestCommandExpandLists")
diff --git a/Tests/RunCMake/CommandLine/Envgen-G-implicit-platform-stdout.txt b/Tests/RunCMake/CommandLine/Envgen-G-implicit-platform-stdout.txt
index 4dd6be1..a182e1c 100644
--- a/Tests/RunCMake/CommandLine/Envgen-G-implicit-platform-stdout.txt
+++ b/Tests/RunCMake/CommandLine/Envgen-G-implicit-platform-stdout.txt
@@ -1 +1 @@
--- CMAKE_VS_PLATFORM_NAME='(x64|Win32)'
+-- CMAKE_VS_PLATFORM_NAME='(x64|Win32|ARM64)'
diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake
index 854f3dc..5ea02a5 100644
--- a/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake
+++ b/Tests/RunCMake/GeneratorToolset/TestToolsetHostArchNone.cmake
@@ -1,10 +1,15 @@
message(STATUS "CMAKE_VS_PLATFORM_TOOLSET='${CMAKE_VS_PLATFORM_TOOLSET}'")
message(STATUS "CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE='${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}'")
+message(STATUS "CMAKE_HOST_SYSTEM_PROCESSOR='${CMAKE_HOST_SYSTEM_PROCESSOR}'")
if(CMAKE_GENERATOR MATCHES "Visual Studio 1[67]")
cmake_host_system_information(RESULT is_64_bit QUERY IS_64BIT)
if(is_64_bit)
- if(NOT "${CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE}" STREQUAL "x64")
+ 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.")
+ 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.")
endif()
endif()
diff --git a/Tests/RunCMake/VS10Project/VsCSharpCompilerOpts-check.cmake b/Tests/RunCMake/VS10Project/VsCSharpCompilerOpts-check.cmake
index 3e418c3..2ba8c3b 100644
--- a/Tests/RunCMake/VS10Project/VsCSharpCompilerOpts-check.cmake
+++ b/Tests/RunCMake/VS10Project/VsCSharpCompilerOpts-check.cmake
@@ -17,9 +17,9 @@ set(releaseOK FALSE)
file(STRINGS "${csProjectFile}" lines)
foreach(line IN LISTS lines)
#message(STATUS ${line})
- if(line MATCHES "^ *<PropertyGroup .*Debug\\|(Win32|x64).*")
+ if(line MATCHES "^ *<PropertyGroup .*Debug\\|(Win32|x64|ARM64).*")
set(inDebug TRUE)
- elseif(line MATCHES "^ *<PropertyGroup .*Release\\|(Win32|x64).*")
+ elseif(line MATCHES "^ *<PropertyGroup .*Release\\|(Win32|x64|ARM64).*")
set(inRelease TRUE)
elseif(line MATCHES "^ *</PropertyGroup> *$")
set(inRelease FALSE)
diff --git a/Tests/RunCMake/VS10Project/VsCSharpDefines-check.cmake b/Tests/RunCMake/VS10Project/VsCSharpDefines-check.cmake
index 631abac..d47bac9 100644
--- a/Tests/RunCMake/VS10Project/VsCSharpDefines-check.cmake
+++ b/Tests/RunCMake/VS10Project/VsCSharpDefines-check.cmake
@@ -17,9 +17,9 @@ set(releaseOK FALSE)
file(STRINGS "${csProjectFile}" lines)
foreach(line IN LISTS lines)
#message(STATUS ${line})
- if(line MATCHES "^ *<PropertyGroup .*Debug\\|(Win32|x64).*")
+ if(line MATCHES "^ *<PropertyGroup .*Debug\\|(Win32|x64|ARM64).*")
set(inDebug TRUE)
- elseif(line MATCHES "^ *<PropertyGroup .*Release\\|(Win32|x64).*")
+ elseif(line MATCHES "^ *<PropertyGroup .*Release\\|(Win32|x64|ARM64).*")
set(inRelease TRUE)
elseif(line MATCHES "^ *</PropertyGroup> *$")
set(inRelease FALSE)