diff options
author | Brad King <brad.king@kitware.com> | 2023-05-09 18:05:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-05-10 14:04:48 (GMT) |
commit | 3a9b8ef0477a41e0146d7ab82f761fdc57f8b351 (patch) | |
tree | e7c3e75450b1f420dbd987a952fd3a7467b921bb /Tests/ISPC/ResponseAndDefine | |
parent | 6aae34ec53daf92a5ff272fb56757109003edb99 (diff) | |
download | CMake-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/ResponseAndDefine')
-rw-r--r-- | Tests/ISPC/ResponseAndDefine/CMakeLists.txt | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Tests/ISPC/ResponseAndDefine/CMakeLists.txt b/Tests/ISPC/ResponseAndDefine/CMakeLists.txt index 7539209..d29cb2a 100644 --- a/Tests/ISPC/ResponseAndDefine/CMakeLists.txt +++ b/Tests/ISPC/ResponseAndDefine/CMakeLists.txt @@ -14,13 +14,15 @@ add_executable(ISPCResponseAndDefine main.cxx simple.ispc) set_target_properties(ISPCResponseAndDefine PROPERTIES POSITION_INDEPENDENT_CODE ON) target_include_directories(ISPCResponseAndDefine PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") -target_compile_options(ISPCResponseAndDefine PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=sse2-i32x4>") -if(CMAKE_SIZEOF_VOID_P EQUAL 4) - target_compile_options(ISPCResponseAndDefine PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--arch=x86>") +if("${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64") + target_compile_options(ISPCResponseAndDefine PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=neon-i32x4>") +else() + target_compile_options(ISPCResponseAndDefine PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=sse2-i32x4>") + if(CMAKE_SIZEOF_VOID_P EQUAL 4) + target_compile_options(ISPCResponseAndDefine PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--arch=x86>") + endif() endif() - - target_compile_definitions(ISPCResponseAndDefine PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:STRUCT_DEFINE=struct{uniform int a>;M_PI=3.14159f") target_include_directories(ISPCResponseAndDefine PRIVATE |