You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

CMakeLists.txt 980 B

5 years ago
5 years ago
5 years ago
5 years ago
12345678910111213141516171819202122
  1. # This branch assumes that gRPC and all its dependencies are already installed
  2. # on this system, so they can be located by find_package().
  3. # Find Protobuf installation
  4. # Looks for protobuf-config.cmake file installed by Protobuf's cmake installation.
  5. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-rpath,$ORIGIN:$ORIGIN/lib")
  6. link_directories(${CMAKE_BINARY_DIR}/googletest/googlemock/gtest)
  7. file(GLOB_RECURSE UT_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "common/*.cc" "tests/*.cc")
  8. include_directories(${CMAKE_CURRENT_SOURCE_DIR}/)
  9. add_executable(serving_ut ${UT_LIST})
  10. target_link_libraries(serving_ut PRIVATE mindspore_serving::gtest)
  11. target_link_libraries(serving_ut PRIVATE -Wl,--whole-archive serving_ut_common -Wl,--no-whole-archive)
  12. # disable auto rpath
  13. set_target_properties(serving_ut PROPERTIES SKIP_BUILD_RPATH TRUE)
  14. # copy gtest lib
  15. file(GLOB_RECURSE GTEST_LIB_LIST ${gtest_LIBPATH}/libgtest*)
  16. file(COPY ${GTEST_LIB_LIST} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

A lightweight and high-performance service module that helps MindSpore developers efficiently deploy online inference services in the production environment.