You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
548 B
17 lines
548 B
3 years ago
|
cmake_minimum_required(VERSION 3.18)
|
||
|
project(ISPCDefines CXX ISPC)
|
||
|
|
||
|
set(CMAKE_ISPC_INSTRUCTION_SETS "sse2-i32x4;sse4-i16x8;avx1-i32x16;avx2-i32x4;avx512knl-i32x16;avx512skx-i32x8")
|
||
|
set(CMAKE_ISPC_FLAGS -DM_PI=3.1415926535f)
|
||
|
add_compile_definitions([==[STRUCT_DEFINE=struct{uniform int a]==])
|
||
|
|
||
|
add_executable(ISPCDefines
|
||
|
main.cxx
|
||
|
simple.ispc
|
||
|
)
|
||
|
|
||
|
set_target_properties(ISPCDefines PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||
|
set_source_files_properties(simple.ispc PROPERTIES COMPILE_OPTIONS "--arch=x86")
|
||
|
endif()
|