diff options
Diffstat (limited to 'Tests/ISPC/ResponseAndDefine/CMakeLists.txt')
-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 |