1# Import function list from math_brute_force 2add_definitions(-DFUNCTION_LIST_ULPS_ONLY) 3 4set(SPIR_OUT ${CONFORMANCE_PREFIX}spir${CONFORMANCE_SUFFIX}) 5 6set (SPIR_SOURCES 7 main.cpp 8 datagen.cpp 9 run_build_test.cpp 10 run_services.cpp 11 kernelargs.cpp 12 ../math_brute_force/function_list.cpp 13) 14 15add_executable(${SPIR_OUT} 16 ${SPIR_SOURCES}) 17 18if(UNIX) 19 set_target_properties(${SPIR_OUT} PROPERTIES 20 COMPILE_FLAGS "-fexceptions -frtti") 21elseif(MSVC) 22 set_target_properties(${SPIR_OUT} PROPERTIES 23 COMPILE_FLAGS "/GR /EHs /EHc") 24endif() 25 26TARGET_LINK_LIBRARIES(${SPIR_OUT} harness 27 ${CLConform_LIBRARIES}) 28 29 30set_source_files_properties(${SPIR_SOURCES} PROPERTIES LANGUAGE CXX) 31 32# Need to copy the spir zips to sit beside the executable 33 34set(SPIR_FILES 35 "khr.csv" 36 "api.zip" 37 "atomics.zip" 38 "basic.zip" 39 "compile_and_link.zip" 40 "commonfns.zip" 41 "conversions.zip" 42 "geometrics.zip" 43 "enum_values.zip" 44 "half.zip" 45 "kernel_attributes.zip" 46 "kernel_image_methods.zip" 47 "images_kernel_read_write.zip" 48 "images_samplerlessRead.zip" 49 "integer_ops.zip" 50 "math_brute_force.zip" 51 "printf.zip" 52 "profiling.zip" 53 "relationals.zip" 54 "select.zip" 55 "sampler_enumeration.zip" 56 "vec_align.zip" 57 "vec_step.zip" 58 "binary_type.zip") 59 60foreach(input_file ${SPIR_FILES}) 61 add_custom_command( 62 TARGET ${SPIR_OUT} 63 POST_BUILD 64 COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/${input_file}" "$<TARGET_FILE_DIR:${SPIR_OUT}>/" 65) 66endforeach(input_file) 67