summaryrefslogtreecommitdiffstats
path: root/Tests/ISPC/ObjectLibrary/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/ISPC/ObjectLibrary/CMakeLists.txt')
-rw-r--r--Tests/ISPC/ObjectLibrary/CMakeLists.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/Tests/ISPC/ObjectLibrary/CMakeLists.txt b/Tests/ISPC/ObjectLibrary/CMakeLists.txt
index edfbdd8..333ad66 100644
--- a/Tests/ISPC/ObjectLibrary/CMakeLists.txt
+++ b/Tests/ISPC/ObjectLibrary/CMakeLists.txt
@@ -3,12 +3,15 @@ cmake_minimum_required(VERSION 3.18)
project(ISPCObjectLibrary CXX ISPC)
set(CMAKE_NINJA_FORCE_RESPONSE_FILE ON)
+if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ set(CMAKE_ISPC_FLAGS "--arch=x86")
+endif()
-add_library(ispc_objects OBJECT simple.ispc)
+add_library(ispc_objects OBJECT simple.ispc extra.ispc)
+
+target_compile_options(ispc_objects PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=sse2-i32x4>")
-target_compile_options(ispc_objects PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=sse2-i32x4;--arch=x86-64>")
-target_include_directories(ispc_objects INTERFACE "${CMAKE_CURRENT_BINARY_DIR}")
set_target_properties(ispc_objects PROPERTIES POSITION_INDEPENDENT_CODE ON)
-add_executable(ISPCObjectLibrary main.cxx)
+add_executable(ISPCObjectLibrary main.cxx extra.cxx)
target_link_libraries(ISPCObjectLibrary PRIVATE ispc_objects)