]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: Fix missing gtest linkage, missing functions. 24921/head
authorWillem Jan Withagen <wjw@digiware.nl>
Sun, 4 Nov 2018 15:31:40 +0000 (16:31 +0100)
committerWillem Jan Withagen <wjw@digiware.nl>
Tue, 6 Nov 2018 11:33:28 +0000 (12:33 +0100)
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 <wjw@digiware.nl>
src/test/compressor/CMakeLists.txt

index d296cdf0bea441d5650d4c7716bb8164de42d21e..46387c93541128be216c104cefe427dc9dd94a20 100644 (file)
@@ -6,5 +6,5 @@ add_executable(unittest_compression
   $<TARGET_OBJECTS:unit-main>
   )
 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)