diff options
Diffstat (limited to 'Tests/ISPC/CustomHeaderSuffix/CMakeLists.txt')
-rw-r--r-- | Tests/ISPC/CustomHeaderSuffix/CMakeLists.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Tests/ISPC/CustomHeaderSuffix/CMakeLists.txt b/Tests/ISPC/CustomHeaderSuffix/CMakeLists.txt new file mode 100644 index 0000000..d20f88e --- /dev/null +++ b/Tests/ISPC/CustomHeaderSuffix/CMakeLists.txt @@ -0,0 +1,23 @@ + +cmake_minimum_required(VERSION 3.18) +project(ISPCCustomHeaderSuffix CXX ISPC) + +if(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(CMAKE_ISPC_FLAGS "--arch=x86") +endif() + +set(CMAKE_ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i8x16") + +set(CMAKE_ISPC_HEADER_SUFFIX ".ispc.h") + +add_library(ispc_suffix_1 OBJECT simple.ispc) +add_library(ispc_suffix_2 OBJECT extra.ispc) + +set_target_properties(ispc_suffix_2 PROPERTIES ISPC_HEADER_SUFFIX "___ispc.h") + +set_target_properties(ispc_suffix_1 ispc_suffix_2 + PROPERTIES POSITION_INDEPENDENT_CODE ON +) + +add_executable(ISPCCustomHeaderSuffix main.cxx extra.cxx) +target_link_libraries(ISPCCustomHeaderSuffix PRIVATE ispc_suffix_1 ispc_suffix_2) |