CMakeLists.txt 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. find_package(ATLAS)
  2. if (ATLAS_FOUND)
  3. btl_add_bench(btl_atlas main.cpp)
  4. if(BUILD_btl_atlas)
  5. target_link_libraries(btl_atlas ${ATLAS_LIBRARIES})
  6. set_target_properties(btl_atlas PROPERTIES COMPILE_FLAGS "-DCBLASNAME=ATLAS -DHAS_LAPACK=1")
  7. endif()
  8. endif ()
  9. find_package(MKL)
  10. if (MKL_FOUND)
  11. btl_add_bench(btl_mkl main.cpp)
  12. if(BUILD_btl_mkl)
  13. target_link_libraries(btl_mkl ${MKL_LIBRARIES})
  14. set_target_properties(btl_mkl PROPERTIES COMPILE_FLAGS "-DCBLASNAME=INTEL_MKL -DHAS_LAPACK=1")
  15. endif()
  16. endif ()
  17. find_package(OPENBLAS)
  18. if (OPENBLAS_FOUND)
  19. btl_add_bench(btl_openblas main.cpp)
  20. if(BUILD_btl_openblas)
  21. target_link_libraries(btl_openblas ${OPENBLAS_LIBRARIES} )
  22. set_target_properties(btl_openblas PROPERTIES COMPILE_FLAGS "-DCBLASNAME=OPENBLAS")
  23. endif()
  24. endif ()
  25. find_package(ACML)
  26. if (ACML_FOUND)
  27. btl_add_bench(btl_acml main.cpp)
  28. if(BUILD_btl_acml)
  29. target_link_libraries(btl_acml ${ACML_LIBRARIES} )
  30. set_target_properties(btl_acml PROPERTIES COMPILE_FLAGS "-DCBLASNAME=ACML -DHAS_LAPACK=1")
  31. endif()
  32. endif ()
  33. if(Eigen_SOURCE_DIR AND CMAKE_Fortran_COMPILER_WORKS)
  34. # we are inside Eigen and blas/lapack interface is compilable
  35. include_directories(${Eigen_SOURCE_DIR})
  36. btl_add_bench(btl_eigenblas main.cpp)
  37. if(BUILD_btl_eigenblas)
  38. target_link_libraries(btl_eigenblas eigen_blas eigen_lapack )
  39. set_target_properties(btl_eigenblas PROPERTIES COMPILE_FLAGS "-DCBLASNAME=EigenBLAS")
  40. endif()
  41. endif()