From 1d6e9ecc77893642f101cca555671c7656bd5dc8 Mon Sep 17 00:00:00 2001 From: Willem Jan Withagen Date: Sun, 4 Nov 2018 16:31:40 +0100 Subject: [PATCH] cmake: Fix missing gtest linkage, missing functions. During linking the error is: ``` /usr/bin/ld.lld: error: undefined symbol: testing::Message::Message() >>> referenced by test_compression.cc:78 (/home/jenkins/workspace/ceph-luminous/src/test/compressor/test_compression.cc:78) >>> CMakeFiles/unittest_compression.dir/test_compression.cc.o:(CompressorTest_small_round_trip_Test::TestBody()) /usr/bin/ld.lld: error: undefined symbol: testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type, char const*, int, char const*) ``` This can probably be fixed by backporting https://github.com/ceph/ceph/pull/23628 and friendsr. But that needs a lot of fixing. So instead of backporting, is this PR a lot easier Signed-off-by: Willem Jan Withagen --- src/test/compressor/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/compressor/CMakeLists.txt b/src/test/compressor/CMakeLists.txt index d296cdf0bea..46387c93541 100644 --- a/src/test/compressor/CMakeLists.txt +++ b/src/test/compressor/CMakeLists.txt @@ -6,5 +6,5 @@ add_executable(unittest_compression $ ) add_ceph_unittest(unittest_compression ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_compression) -target_link_libraries(unittest_compression global) +target_link_libraries(unittest_compression global gtest) add_dependencies(unittest_compression ceph_example) -- 2.47.3