summaryrefslogtreecommitdiff
path: root/benchmark/CMakeLists.txt
blob: 4c43daf83b80e275988841eb09d148db35edd43e (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
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
                    ${CMAKE_CURRENT_SOURCE_DIR}/../utests
                    ${CMAKE_CURRENT_SOURCE_DIR}/../include)


link_directories (${LLVM_LIBRARY_DIR} ${DRM_LIBDIR})
set (benchmark_sources
  ../utests/utest_error.c
  ../utests/utest_assert.cpp
  ../utests/utest.cpp
  ../utests/utest_file_map.cpp
  ../utests/utest_helper.cpp
  ../utests/vload_bench.cpp
  benchmark_copy_buf.cpp
  benchmark_use_host_ptr_buffer.cpp
  benchmark_use_host_ptr_large_image.cpp
  benchmark_read_buffer.cpp
  benchmark_read_image.cpp
  benchmark_copy_buffer_to_image.cpp
  benchmark_copy_image_to_buffer.cpp
  benchmark_copy_buffer.cpp
  benchmark_copy_image.cpp
  benchmark_workgroup.cpp
  benchmark_math.cpp)


SET(CMAKE_CXX_FLAGS "-DBUILD_BENCHMARK ${CMAKE_CXX_FLAGS}")
SET(CMAKE_C_FLAGS "-DBUILD_BENCHMARK ${CMAKE_C_FLAGS}")

ADD_LIBRARY(benchmarks SHARED ${ADDMATHFUNC} ${benchmark_sources})

#TARGET_LINK_LIBRARIES(benchmarks cl m ${OPENGL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
TARGET_LINK_LIBRARIES(benchmarks cl m)

ADD_EXECUTABLE(benchmark_run benchmark_run.cpp)
TARGET_LINK_LIBRARIES(benchmark_run benchmarks)
ADD_CUSTOM_TARGET(benchmark DEPENDS benchmarks benchmark_run)