2014-11-06 07:07:27 -05:00
|
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
|
|
|
|
|
|
find_package(CUDA)
|
|
|
|
|
2014-10-27 05:35:04 -04:00
|
|
|
foreach(PROG blas)
|
|
|
|
add_executable(${PROG}-bench ${PROG}.cpp)
|
|
|
|
target_link_libraries(${PROG}-bench ${OPENCL_LIBRARIES})
|
|
|
|
set_target_properties(${PROG}-bench PROPERTIES COMPILE_FLAGS "-DVIENNACL_WITH_OPENCL -Wall -Wextra")
|
2014-10-30 20:42:23 -04:00
|
|
|
|
2014-11-06 07:07:27 -05:00
|
|
|
if(CUDA_FOUND)
|
|
|
|
set(CUPROG cu${PROG})
|
|
|
|
cuda_add_executable(${CUPROG}-bench ${CUPROG}.cu OPTIONS "-DVIENNACL_WITH_OPENCL")
|
|
|
|
target_link_libraries(${CUPROG}-bench ${CUPROG} OpenCL)
|
|
|
|
endif()
|
|
|
|
endforeach(PROG)
|