1cmake_minimum_required(VERSION 3.4.1) 2 3# Build stub 4add_subdirectory(libopencl-stub) 5 6set(ROOT_FOLDER "../../../../..") 7include(${ROOT_FOLDER}/cmake/common.cmake) 8 9set(SRC_FOLDER "${ROOT_FOLDER}/src") 10add_library(clpeak SHARED 11 ${SRC_FOLDER}/common.cpp 12 ${SRC_FOLDER}/clpeak.cpp 13 ${SRC_FOLDER}/global_bandwidth.cpp 14 ${SRC_FOLDER}/compute_sp.cpp 15 ${SRC_FOLDER}/compute_hp.cpp 16 ${SRC_FOLDER}/compute_dp.cpp 17 ${SRC_FOLDER}/compute_integer.cpp 18 ${SRC_FOLDER}/compute_integer_fast.cpp 19 ${SRC_FOLDER}/transfer_bandwidth.cpp 20 ${SRC_FOLDER}/kernel_latency.cpp 21 ${SRC_FOLDER}/entry_android.cpp 22 ${SRC_FOLDER}/options.cpp 23 ${SRC_FOLDER}/logger_android.cpp 24) 25 26target_include_directories(clpeak PRIVATE 27 libopencl-stub/include/ 28 ${ROOT_FOLDER}/include/ 29 ${SRC_FOLDER}/kernels/ 30) 31 32target_compile_definitions(clpeak PRIVATE ANDROID_LOGGER USE_STUB_OPENCL) 33target_compile_options(clpeak PRIVATE -fPIC -O2 -fexceptions) 34target_link_libraries(clpeak log atomic dl OpenCL) 35