summaryrefslogtreecommitdiffstats
path: root/Tests/ISPC/StaticLibrary/CMakeLists.txt
blob: b0575441625299f3b15eab13b60c0b7cc38be2dc (plain)
1
2
3
4
5
6
7
8
9
10
11
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)