summaryrefslogtreecommitdiffstats
path: root/Tests/ISPC/StaticLibrary
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/ISPC/StaticLibrary')
-rw-r--r--Tests/ISPC/StaticLibrary/CMakeLists.txt7
-rw-r--r--Tests/ISPC/StaticLibrary/main.cxx2
2 files changed, 6 insertions, 3 deletions
diff --git a/Tests/ISPC/StaticLibrary/CMakeLists.txt b/Tests/ISPC/StaticLibrary/CMakeLists.txt
index b057544..ebe5960 100644
--- a/Tests/ISPC/StaticLibrary/CMakeLists.txt
+++ b/Tests/ISPC/StaticLibrary/CMakeLists.txt
@@ -4,8 +4,11 @@ project(ISPCStaticLibrary CXX ISPC)
add_library(ispc_objects STATIC simple.ispc)
-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}")
+target_compile_options(ispc_objects PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=sse2-i32x4>")
+if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ target_compile_options(ispc_objects PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--arch=x86>")
+endif()
+
set_target_properties(ispc_objects PROPERTIES POSITION_INDEPENDENT_CODE ON)
add_executable(ISPCStaticLibrary main.cxx)
diff --git a/Tests/ISPC/StaticLibrary/main.cxx b/Tests/ISPC/StaticLibrary/main.cxx
index a6b91a6..4f1c9be 100644
--- a/Tests/ISPC/StaticLibrary/main.cxx
+++ b/Tests/ISPC/StaticLibrary/main.cxx
@@ -1,6 +1,6 @@
#include <stdio.h>
-#include "simple_ispc.h"
+#include "simple.ispc.h"
int main()
{