summaryrefslogtreecommitdiffstats
path: root/Tests/ISPC/SystemIncludes
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/SystemIncludes
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/SystemIncludes')
-rw-r--r--Tests/ISPC/SystemIncludes/CMakeLists.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/Tests/ISPC/SystemIncludes/CMakeLists.txt b/Tests/ISPC/SystemIncludes/CMakeLists.txt
index d94e75e..3b4c289 100644
--- a/Tests/ISPC/SystemIncludes/CMakeLists.txt
+++ b/Tests/ISPC/SystemIncludes/CMakeLists.txt
@@ -7,8 +7,11 @@ set_target_properties(ISPCSystemIncludes PROPERTIES POSITION_INDEPENDENT_CODE ON
set_target_properties(ISPCSystemIncludes PROPERTIES ISPC_HEADER_SUFFIX ".ispc.h")
target_include_directories(ISPCSystemIncludes SYSTEM PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
-
-target_compile_options(ISPCSystemIncludes PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=sse2-i32x4>")
-if(CMAKE_SIZEOF_VOID_P EQUAL 4)
- target_compile_options(ISPCSystemIncludes PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--arch=x86>")
+if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
+ target_compile_options(ISPCSystemIncludes PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=neon-i32x4>")
+else()
+ target_compile_options(ISPCSystemIncludes PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=sse2-i32x4>")
+ if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ target_compile_options(ISPCSystemIncludes PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--arch=x86>")
+ endif()
endif()