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/ResponseAndDefine/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/ResponseAndDefine/CMakeLists.txt')
-rw-r--r-- | Tests/ISPC/ResponseAndDefine/CMakeLists.txt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Tests/ISPC/ResponseAndDefine/CMakeLists.txt b/Tests/ISPC/ResponseAndDefine/CMakeLists.txt new file mode 100644 index 0000000..0dc5320 --- /dev/null +++ b/Tests/ISPC/ResponseAndDefine/CMakeLists.txt @@ -0,0 +1,24 @@ + +project(ispc_spaces_in_path) + +set(CMAKE_NINJA_FORCE_RESPONSE_FILE ON) + +# Make sure we can handle an arg file with tricky defines including spaces in -I include +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/path with spaces/simple_include.h" +" + typedef float FLOAT_TYPE; +" +) + +add_executable(SpacesInPath main.cxx simple.ispc) +set_target_properties(SpacesInPath PROPERTIES POSITION_INDEPENDENT_CODE ON) +target_include_directories(SpacesInPath PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") + +target_compile_options(SpacesInPath PRIVATE + "$<$<COMPILE_LANGUAGE:ISPC>:--target=sse2-i32x4;--arch=x86-64>") + +target_compile_definitions(SpacesInPath PRIVATE + "$<$<COMPILE_LANGUAGE:ISPC>:STRUCT_DEFINE=\"struct{uniform int a;varying int b;\";M_PI=3.1415926535f>") +target_include_directories(SpacesInPath PRIVATE + "$<$<COMPILE_LANGUAGE:ISPC>:\"fake path with spaces\">"" + "$<$<COMPILE_LANGUAGE:ISPC>:\"path with spaces\">") |