aboutsummaryrefslogtreecommitdiff
path: root/bench/btl/libs/BLAS/CMakeLists.txt
blob: de42fe047cafc469f7d807fc0f2637db9555358d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60

find_package(ATLAS)
if (ATLAS_FOUND)
  btl_add_bench(btl_atlas main.cpp)
  if(BUILD_btl_atlas)
    target_link_libraries(btl_atlas ${ATLAS_LIBRARIES})
    set_target_properties(btl_atlas PROPERTIES COMPILE_FLAGS "-DCBLASNAME=ATLAS -DHAS_LAPACK=1")
  endif(BUILD_btl_atlas)
endif (ATLAS_FOUND)

find_package(MKL)
if (MKL_FOUND)
  btl_add_bench(btl_mkl main.cpp)
  if(BUILD_btl_mkl)
    target_link_libraries(btl_mkl ${MKL_LIBRARIES})
    set_target_properties(btl_mkl PROPERTIES COMPILE_FLAGS "-DCBLASNAME=INTEL_MKL -DHAS_LAPACK=1")
  endif(BUILD_btl_mkl)
endif (MKL_FOUND)


find_package(GOTO2)
if (GOTO2_FOUND)
  btl_add_bench(btl_goto2 main.cpp)
  if(BUILD_btl_goto2)
    target_link_libraries(btl_goto2 ${GOTO_LIBRARIES} )
    set_target_properties(btl_goto2 PROPERTIES COMPILE_FLAGS "-DCBLASNAME=GOTO2")
  endif(BUILD_btl_goto2)
endif (GOTO2_FOUND)

find_package(GOTO)
if (GOTO_FOUND)
  if(GOTO2_FOUND)
    btl_add_bench(btl_goto main.cpp OFF)
  else()
    btl_add_bench(btl_goto main.cpp)
  endif()
  if(BUILD_btl_goto)
    target_link_libraries(btl_goto ${GOTO_LIBRARIES} )
    set_target_properties(btl_goto PROPERTIES COMPILE_FLAGS "-DCBLASNAME=GOTO")
  endif(BUILD_btl_goto)
endif (GOTO_FOUND)

find_package(ACML)
if (ACML_FOUND)
  btl_add_bench(btl_acml main.cpp)
  if(BUILD_btl_acml)
    target_link_libraries(btl_acml ${ACML_LIBRARIES} )
    set_target_properties(btl_acml PROPERTIES COMPILE_FLAGS "-DCBLASNAME=ACML -DHAS_LAPACK=1")
  endif(BUILD_btl_acml)
endif (ACML_FOUND)

if(Eigen_SOURCE_DIR AND CMAKE_Fortran_COMPILER_WORKS)
  # we are inside Eigen and blas/lapack interface is compilable
  include_directories(${Eigen_SOURCE_DIR})
  btl_add_bench(btl_eigenblas main.cpp)
  if(BUILD_btl_eigenblas)
    target_link_libraries(btl_eigenblas eigen_blas eigen_lapack )
    set_target_properties(btl_eigenblas PROPERTIES COMPILE_FLAGS "-DCBLASNAME=EigenBLAS")
  endif()
endif()