summaryrefslogtreecommitdiffstats
path: root/Tests/ISPC/Defines/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/ISPC/Defines/CMakeLists.txt')
-rw-r--r--Tests/ISPC/Defines/CMakeLists.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/Tests/ISPC/Defines/CMakeLists.txt b/Tests/ISPC/Defines/CMakeLists.txt
index 2c9f4c3..5155106 100644
--- a/Tests/ISPC/Defines/CMakeLists.txt
+++ b/Tests/ISPC/Defines/CMakeLists.txt
@@ -1,11 +1,15 @@
cmake_minimum_required(VERSION 3.18)
project(ISPCDefines CXX ISPC)
-set(CMAKE_ISPC_FLAGS -DM_PI=3.1415926535f [==[-DSTRUCT_DEFINE=struct{uniform int a]==])
+set(CMAKE_ISPC_FLAGS -DM_PI=3.1415926535f)
+add_compile_definitions([==[STRUCT_DEFINE=struct{uniform int a]==])
-add_executable(ISPCResponseFile
+add_executable(ISPCDefines
main.cxx
simple.ispc
)
-set_target_properties(ISPCResponseFile PROPERTIES POSITION_INDEPENDENT_CODE ON)
-target_include_directories(ISPCResponseFile PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
+
+set_target_properties(ISPCDefines PROPERTIES POSITION_INDEPENDENT_CODE ON)
+if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ set_source_files_properties(simple.ispc PROPERTIES COMPILE_OPTIONS "--arch=x86")
+endif()