CMakeLists.txt 428 字节
Newer Older
Y
Yu Yang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
function(add_capi_unittest TARGET_NAME)
  add_executable(
    ${TARGET_NAME}
    ${ARGN})
  target_link_libraries(
    ${TARGET_NAME}
    paddle_capi
    paddle_test_main
    ${GTEST_LIBRARIES})
  target_include_directories(${TARGET_NAME} PUBLIC ${PADDLE_CAPI_INC_PATH})
  add_test(NAME ${TARGET_NAME} COMMAND ${TARGET_NAME})
endfunction()

add_capi_unittest(capi_test_mats test_Vector.cpp
  test_Matrix.cpp test_Arguments.cpp)