diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-06-30 14:13:53 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2020-08-28 15:21:31 (GMT) |
commit | e783bf8aa6f90ddb1458c7b1a78c5d0225c1496a (patch) | |
tree | b59fe2e01365d0ec14d79f38be8bede5afde6a62 /Tests/ISPC/Defines | |
parent | 34cc6acc81758e29f8c88607c21ab11d8807f87c (diff) | |
download | CMake-e783bf8aa6f90ddb1458c7b1a78c5d0225c1496a.zip CMake-e783bf8aa6f90ddb1458c7b1a78c5d0225c1496a.tar.gz CMake-e783bf8aa6f90ddb1458c7b1a78c5d0225c1496a.tar.bz2 |
ISPC: Support ISPC header generation byproducts and parallel builds
Diffstat (limited to 'Tests/ISPC/Defines')
-rw-r--r-- | Tests/ISPC/Defines/CMakeLists.txt | 12 | ||||
-rw-r--r-- | Tests/ISPC/Defines/main.cxx | 2 |
2 files changed, 9 insertions, 5 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() diff --git a/Tests/ISPC/Defines/main.cxx b/Tests/ISPC/Defines/main.cxx index a6b91a6..4f1c9be 100644 --- a/Tests/ISPC/Defines/main.cxx +++ b/Tests/ISPC/Defines/main.cxx @@ -1,6 +1,6 @@ #include <stdio.h> -#include "simple_ispc.h" +#include "simple.ispc.h" int main() { |