summaryrefslogtreecommitdiffstats
path: root/Tests/ISPC/ObjectGenex
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/ObjectGenex
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/ObjectGenex')
-rw-r--r--Tests/ISPC/ObjectGenex/CMakeLists.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/Tests/ISPC/ObjectGenex/CMakeLists.txt b/Tests/ISPC/ObjectGenex/CMakeLists.txt
index bc0cbf6..5e64004 100644
--- a/Tests/ISPC/ObjectGenex/CMakeLists.txt
+++ b/Tests/ISPC/ObjectGenex/CMakeLists.txt
@@ -1,7 +1,14 @@
cmake_minimum_required(VERSION 3.18)
project(ISPCObjectGenex CXX ISPC)
-set(CMAKE_ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i16x8;avx1-i32x16;avx2-i32x4;avx512knl-i32x16;avx512skx-i32x8")
+if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
+ set(CMAKE_ISPC_INSTRUCTION_SETS "neon-i32x4")
+ set(numberOfTargets 1)
+else()
+ set(CMAKE_ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i16x8;avx1-i32x16;avx2-i32x4;avx512knl-i32x16;avx512skx-i32x8")
+ list(LENGTH CMAKE_ISPC_INSTRUCTION_SETS numberOfTargets)
+ math(EXPR numberOfTargets "${numberOfTargets}+1")
+endif()
add_library(ispc_objects OBJECT
simple.ispc
@@ -35,8 +42,6 @@ static std::string obj_paths = "$<TARGET_OBJECTS:ispc_objects>";
add_executable(ISPCObjectGenex main.cxx)
add_dependencies(ISPCObjectGenex ispc_objects)
-list(LENGTH CMAKE_ISPC_INSTRUCTION_SETS numberOfTargets)
-math(EXPR numberOfTargets "${numberOfTargets}+1")
target_compile_definitions(ISPCObjectGenex PRIVATE
"ExpectedISPCObjects=${numberOfTargets}"
"CONFIG_TYPE=gen_$<LOWER_CASE:$<CONFIG>>"