Files
triton/bench/CMakeLists.txt

35 lines
896 B
CMake
Raw Normal View History

2014-11-06 07:07:27 -05:00
set(CMAKE_BUILD_TYPE Release)
set(BLAS_DEF)
set(BLAS_LIBS atidlas)
#CUBLAS
2014-11-06 07:07:27 -05:00
find_package(CUDA)
if(CUDA_FOUND)
2015-01-27 15:12:08 -05:00
set(BLAS_DEF ${BLAS_DEF} "-DBENCH_CUBLAS")
endif()
2015-01-27 15:12:08 -05:00
#CLAMDBLAS
2015-01-27 15:12:08 -05:00
find_package(CLAMDBLAS)
if(CLAMDBLAS_FOUND)
set(BLAS_DEF ${BLAS_DEF} "-DBENCH_CLAMDBLAS")
include_directories(${CLAMDBLAS_INCLUDE_DIR})
set(BLAS_LIBS ${BLAS_LIBS} ${CLAMDBLAS_LIBRARIES} )
endif()
2015-01-27 15:12:08 -05:00
#CBLAS
find_package(MKL)
if(MKL_FOUND)
set(BLAS_DEF ${BLAS_DEF} "-DBENCH_CBLAS")
include_directories(${MKL_INCLUDE_DIR})
set(BLAS_LIBS ${BLAS_LIBS} ${MKL_LIBRARIES} )
endif()
string(REPLACE ";" " " BLAS_DEF_STR "${BLAS_DEF}")
2014-11-06 07:07:27 -05:00
foreach(PROG blas overhead)
add_executable(${PROG}-bench ${PROG}.cpp)
target_link_libraries(${PROG}-bench ${BLAS_LIBS} ${OPENCL_LIBRARIES})
set_target_properties(${PROG}-bench PROPERTIES COMPILE_FLAGS "-Wall -Wextra ${BLAS_DEF_STR}")
2014-11-06 07:07:27 -05:00
endforeach(PROG)