Tests: Teach ISPC tests to run on macOS arm64 host

This commit is contained in:
Brad King
2023-05-09 14:05:32 -04:00
parent 6aae34ec53
commit 3a9b8ef047
12 changed files with 71 additions and 25 deletions
+5 -1
View File
@@ -11,8 +11,12 @@ endif()
add_library(ispc_objects OBJECT simple.ispc subdir/extra.ispc)
set_target_properties(ispc_objects PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_target_properties(ispc_objects PROPERTIES ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i8x16")
if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
set_property(TARGET ispc_objects PROPERTY ISPC_INSTRUCTION_SETS "neon-i32x4")
else()
set_property(TARGET ispc_objects PROPERTY ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i8x16")
endif()
add_executable(ISPCObjectLibrary main.cxx extra.cxx)
target_link_libraries(ISPCObjectLibrary PRIVATE ispc_objects)