From: Willem Jan Withagen Date: Sun, 4 Nov 2018 15:31:40 +0000 (+0100) Subject: cmake: Fix missing gtest linkage, missing functions. X-Git-Tag: v12.2.11~50^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F24921%2Fhead;p=ceph.git 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 --- 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)