summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/install
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-09 18:05:32 (GMT)
committerBrad King <brad.king@kitware.com>2023-05-10 14:04:48 (GMT)
commit3a9b8ef0477a41e0146d7ab82f761fdc57f8b351 (patch)
treee7c3e75450b1f420dbd987a952fd3a7467b921bb /Tests/RunCMake/install
parent6aae34ec53daf92a5ff272fb56757109003edb99 (diff)
downloadCMake-3a9b8ef0477a41e0146d7ab82f761fdc57f8b351.zip
CMake-3a9b8ef0477a41e0146d7ab82f761fdc57f8b351.tar.gz
CMake-3a9b8ef0477a41e0146d7ab82f761fdc57f8b351.tar.bz2
Tests: Teach ISPC tests to run on macOS arm64 host
Diffstat (limited to 'Tests/RunCMake/install')
-rw-r--r--Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS-all-check.cmake6
-rw-r--r--Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS.cmake6
2 files changed, 10 insertions, 2 deletions
diff --git a/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS-all-check.cmake b/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS-all-check.cmake
index 8750a76..2d4ce66 100644
--- a/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS-all-check.cmake
+++ b/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS-all-check.cmake
@@ -1,6 +1,10 @@
set(objs obj1 obj2)
-set(targets sse2 sse4 avx avx2)
+if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
+ set(targets "")
+else()
+ set(targets sse2 sse4 avx avx2)
+endif()
foreach(o IN LISTS objs)
set(item "objs/${o}\\.ispc\\.(o|obj)")
check_installed("${item}")
diff --git a/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS.cmake b/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS.cmake
index ad542ed..91ed458 100644
--- a/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS.cmake
+++ b/Tests/RunCMake/install/FILES-EXTRA_ISPC_TARGET_OBJECTS.cmake
@@ -1,4 +1,8 @@
enable_language(ISPC)
add_library(objs OBJECT obj1.ispc obj2.ispc)
-set_target_properties(objs PROPERTIES ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i16x8;avx1-i32x16;avx2-i32x4")
+if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
+ set_property(TARGET objs PROPERTY ISPC_INSTRUCTION_SETS "neon-i32x4")
+else()
+ set_property(TARGET objs PROPERTY ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i16x8;avx1-i32x16;avx2-i32x4")
+endif()
install(FILES $<TARGET_OBJECTS:objs> DESTINATION objs)