From 21c6130ba72b3f25a79c375d92344544463e884e Mon Sep 17 00:00:00 2001 From: lihuiba Date: Fri, 20 Dec 2024 11:32:42 +0800 Subject: [PATCH] enforce linking of ci-tools --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e37a56da..79e06415 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -390,11 +390,12 @@ if (PHOTON_BUILD_TESTING) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/output) include(generate-ctest-packed-script) - add_library(ci-tools STATIC test/ci-tools.cpp) + add_library(ci-tools OBJECT test/ci-tools.cpp) target_include_directories(ci-tools PRIVATE include) target_include_directories(photon_shared PUBLIC ${CURL_INCLUDE_DIRS} ${GFLAGS_INCLUDE_DIRS} ${GOOGLETEST_INCLUDE_DIRS}) - target_link_libraries(photon_shared PUBLIC ${CURL_LIBRARIES} ${GFLAGS_LIBRARIES} ${GOOGLETEST_LIBRARIES} ci-tools) + target_link_libraries(photon_shared PUBLIC ${CURL_LIBRARIES} ${GFLAGS_LIBRARIES} ${GOOGLETEST_LIBRARIES}) + link_libraries(ci-tools) add_subdirectory(common/checksum/test) add_subdirectory(common/test)