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/StaticLibrary | |
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/StaticLibrary')
-rw-r--r-- | Tests/ISPC/StaticLibrary/CMakeLists.txt | 7 | ||||
-rw-r--r-- | Tests/ISPC/StaticLibrary/main.cxx | 2 |
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() { |