summaryrefslogtreecommitdiffstats
path: root/Tests/ISPC/DynamicLibrary
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/ISPC/DynamicLibrary
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/ISPC/DynamicLibrary')
-rw-r--r--Tests/ISPC/DynamicLibrary/CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/Tests/ISPC/DynamicLibrary/CMakeLists.txt b/Tests/ISPC/DynamicLibrary/CMakeLists.txt
index 4655090..516cdc1 100644
--- a/Tests/ISPC/DynamicLibrary/CMakeLists.txt
+++ b/Tests/ISPC/DynamicLibrary/CMakeLists.txt
@@ -13,8 +13,13 @@ target_sources(ispc_objects2 PRIVATE simple.cxx)
set_target_properties(ispc_objects1 PROPERTIES POSITION_INDEPENDENT_CODE ON)
-set_target_properties(ispc_objects1 PROPERTIES ISPC_INSTRUCTION_SETS "sse2-i32x4;avx1-i32x16;avx2-i32x4")
-set_target_properties(ispc_objects2 PROPERTIES ISPC_INSTRUCTION_SETS "sse2-i32x4")
+if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
+ set_property(TARGET ispc_objects1 PROPERTY ISPC_INSTRUCTION_SETS "neon-i32x4")
+ set_property(TARGET ispc_objects2 PROPERTY ISPC_INSTRUCTION_SETS "neon-i32x4")
+else()
+ set_property(TARGET ispc_objects1 PROPERTY ISPC_INSTRUCTION_SETS "sse2-i32x4;avx1-i32x16;avx2-i32x4")
+ set_property(TARGET ispc_objects2 PROPERTY ISPC_INSTRUCTION_SETS "sse2-i32x4")
+endif()
target_link_libraries(ispc_objects2 PUBLIC ispc_objects1)