CMakeLists.txt 1.1 KB
Newer Older
S
update  
superjomn 已提交
1
set(cxx_api_lite_deps scope_lite optimizer_lite target_wrapper_host optimizer_lite model_parser_lite)
S
superjomn 已提交
2
if(LITE_WITH_CUDA)
3
    set(cxx_api_lite_deps ${cxx_api_lite_deps} kernels_cuda)
S
Superjomn 已提交
4 5
    cc_library(cxx_api_lite_cuda SRCS cxx_api.cc DEPS ${cxx_api_lite_deps} target_wrapper_cuda)
    nv_test(test_cxx_api_lite_cuda SRCS cxx_api_test.cc DEPS cxx_api_lite_cuda)
S
superjomn 已提交
6
endif()
S
Superjomn 已提交
7

S
update  
superjomn 已提交
8
cc_library(cxx_api_lite SRCS cxx_api.cc DEPS ${cxx_api_lite_deps} ${ops_lite})
S
Superjomn 已提交
9 10

set(light_api_deps
S
update  
superjomn 已提交
11
    scope_lite target_wrapper_host model_parser_lite)
S
Superjomn 已提交
12 13 14 15 16

if(LITE_WITH_CUDA)
    set(light_api_deps ${light_api_deps} target_wrapper_cuda)
endif()

S
update  
superjomn 已提交
17
cc_library(light_api_lite SRCS light_api.cc DEPS ${light_api_deps} ${ops_lite} ${host_kernels})
S
Superjomn 已提交
18

S
update  
superjomn 已提交
19 20 21 22
message(STATUS "get ops ${ops_lite}")
message(STATUS "get kernels ${host_kernels}")
lite_cc_test(test_cxx_api_lite SRCS cxx_api_test.cc DEPS cxx_api_lite model_parser_lite target_wrapper_host
  ${ops_lite} ${host_kernels})
23
lite_cc_test(test_light_api SRCS light_api_test.cc DEPS light_api_lite)
24 25

cc_binary(cxx_api_lite_bin SRCS cxx_api_bin.cc DEPS cxx_api_lite model_parser_lite target_wrapper_host ${ops_lite} ${host_kernels})