| 1 | Use system spdlog, cxxopts and gtest instead of the bundled
|
| 2 | third_party/ copies. The remaining bundled deps (cpu_features, ruy,
|
| 3 | cpuinfo) are not packaged in Alpine.
|
| 4 |
|
| 5 | |
| 6 | |
| 7 | @@ -105,7 +105,7 @@ if(MSVC)
|
| 8 | endif()
|
| 9 |
|
| 10 | find_package(Threads)
|
| 11 | -add_subdirectory(third_party/spdlog EXCLUDE_FROM_ALL)
|
| 12 | +find_package(spdlog REQUIRED)
|
| 13 |
|
| 14 | set(PRIVATE_INCLUDE_DIRECTORIES
|
| 15 | ${CMAKE_CURRENT_SOURCE_DIR}/src
|
| 16 | |
| 17 | |
| 18 | @@ -1,15 +1,6 @@
|
| 19 | -if (NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../third_party/cxxopts/include")
|
| 20 | - message(FATAL_ERROR "The client dependency repository (cxxopts) is missing! "
|
| 21 | - "You probably didn't clone the project with --recursive. You can include it "
|
| 22 | - "by calling \"git submodule update --init --recursive\"")
|
| 23 | -endif()
|
| 24 | -
|
| 25 | add_executable(translator
|
| 26 | translator.cc
|
| 27 | )
|
| 28 | -target_include_directories(translator
|
| 29 | - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../third_party/cxxopts/include
|
| 30 | - )
|
| 31 | target_link_libraries(translator
|
| 32 | PRIVATE ${PROJECT_NAME}
|
| 33 | )
|
| 34 | |
| 35 | |
| 36 | @@ -1,8 +1,6 @@
|
| 37 | enable_testing()
|
| 38 |
|
| 39 | -option(BUILD_GMOCK "" OFF)
|
| 40 | -option(INSTALL_GTEST "" OFF)
|
| 41 | -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../third_party/googletest ${CMAKE_CURRENT_BINARY_DIR}/googletest)
|
| 42 | +find_package(GTest REQUIRED)
|
| 43 |
|
| 44 | add_executable(ctranslate2_test
|
| 45 | attention_test.cc
|
| 46 | @@ -21,7 +19,7 @@ target_include_directories(ctranslate2_test PRIVATE
|
| 47 | )
|
| 48 | target_link_libraries(ctranslate2_test PRIVATE
|
| 49 | ${PROJECT_NAME}
|
| 50 | - gtest_main
|
| 51 | + GTest::gtest_main
|
| 52 | )
|
| 53 |
|
| 54 | add_executable(benchmark_ops
|