diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-07-16 19:18:55 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2020-08-28 15:21:31 (GMT) |
commit | 34cc6acc81758e29f8c88607c21ab11d8807f87c (patch) | |
tree | 38effcd493f057f6148f4d8f58262dfb27afaa24 /Tests/ISPC/StaticLibrary/CMakeLists.txt | |
parent | 419d70d49000e10c36d9615574ff03513f2edf0d (diff) | |
download | CMake-34cc6acc81758e29f8c88607c21ab11d8807f87c.zip CMake-34cc6acc81758e29f8c88607c21ab11d8807f87c.tar.gz CMake-34cc6acc81758e29f8c88607c21ab11d8807f87c.tar.bz2 |
Add ISPC compiler support to CMake
Diffstat (limited to 'Tests/ISPC/StaticLibrary/CMakeLists.txt')
-rw-r--r-- | Tests/ISPC/StaticLibrary/CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/ISPC/StaticLibrary/CMakeLists.txt b/Tests/ISPC/StaticLibrary/CMakeLists.txt new file mode 100644 index 0000000..b057544 --- /dev/null +++ b/Tests/ISPC/StaticLibrary/CMakeLists.txt @@ -0,0 +1,12 @@ + +cmake_minimum_required(VERSION 3.18) +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}") +set_target_properties(ispc_objects PROPERTIES POSITION_INDEPENDENT_CODE ON) + +add_executable(ISPCStaticLibrary main.cxx) +target_link_libraries(ISPCStaticLibrary PRIVATE ispc_objects) |