mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 14:48:19 -05:00
c9a50f3556
The target property `ISPC_HEADER_SUFFIX` and associated global variable now can control the suffix used when generating the C/C++ interoperability ISPC headers. In addition the default suffix is now "_ispc.h" which matches the common convention that the ISPC compiler team uses and recommends.
15 lines
626 B
CMake
15 lines
626 B
CMake
cmake_minimum_required(VERSION 3.18)
|
|
project(ispc_spaces_in_path ISPC CXX)
|
|
|
|
|
|
add_executable(ISPCSystemIncludes main.cxx simple.ispc)
|
|
set_target_properties(ISPCSystemIncludes PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
|
set_target_properties(ISPCSystemIncludes PROPERTIES ISPC_HEADER_SUFFIX ".ispc.h")
|
|
target_include_directories(ISPCSystemIncludes SYSTEM PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
|
|
|
|
|
|
target_compile_options(ISPCSystemIncludes PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--target=sse2-i32x4>")
|
|
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
|
target_compile_options(ISPCSystemIncludes PRIVATE "$<$<COMPILE_LANGUAGE:ISPC>:--arch=x86>")
|
|
endif()
|