1 cmake_minimum_required(VERSION 3.22.1) 2 project(opencl_backend) 3 4 set(CMAKE_CXX_STANDARD 14) 5 6 #find_package(OpenCL) 7 8 if ("${MOCK_BACKEND}EMPTY" STREQUAL "EMPTY") 9 set (MOCK_BACKEND "${CMAKE_SOURCE_DIR}") 10 message("MOCK_BACKEND=${MOCK_BACKEND}") 11 endif() 12 13 if ("${SHARED_BACKEND}EMPTY" STREQUAL "EMPTY") 14 set (SHARED_BACKEND "${CMAKE_SOURCE_DIR}/../shared") 15 message("SHARED_BACKEND=${SHARED_BACKEND}") 16 endif() 17 18 19 message("MOCK") 20 21 include_directories( 22 ${MOCK_BACKEND}/include 23 ${SHARED_BACKEND}/include 24 ${MOCK_INCLUDE_DIR} 25 ) 26 link_directories( 27 ${CMAKE_BINARY_DIR} 28 ) 29 30 add_library(mock_backend SHARED 31 ${SHARED_BACKEND}/cpp/shared.cpp 32 ${MOCK_BACKEND}/cpp/mock_backend.cpp 33 ) 34 35 36 add_executable(mock_info 37 ${MOCK_BACKEND}/cpp/info.cpp 38 ) 39 40 target_link_libraries(mock_info 41 mock_backend 42 ) 43 44 45 46 47