]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: only link against necessary libs
authorKefu Chai <kchai@redhat.com>
Mon, 2 Sep 2019 08:07:49 +0000 (16:07 +0800)
committerNathan Cutler <ncutler@suse.com>
Tue, 6 Apr 2021 12:27:27 +0000 (14:27 +0200)
some executables like ceph_test_mon_memory_target does not link against
gtest or gmock, so no need to link agains them.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 45bab2cb1cf667c2c5c82a78a141fa5883dbd0e3)

src/test/mon/CMakeLists.txt

index 1f4e3db9e79f345594a310e65f18eca289e9f76b..4c8244a83abe3c04fd3092efd74ab050bd62c017 100644 (file)
@@ -49,24 +49,19 @@ target_link_libraries(unittest_mon_montypes mon global)
 
 # ceph_test_mon_memory_target
 add_executable(ceph_test_mon_memory_target
-  test_mon_memory_target.cc
-  )
-target_link_libraries(ceph_test_mon_memory_target ${UNITTEST_LIBS} Boost::system)
+  test_mon_memory_target.cc)
+target_link_libraries(ceph_test_mon_memory_target Boost::system Threads::Threads)
 install(TARGETS ceph_test_mon_memory_target
   DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # ceph_test_mon_log_rss_usage
 add_executable(ceph_test_log_rss_usage
-  test_log_rss_usage.cc
-  )
-target_link_libraries(ceph_test_log_rss_usage ${UNITTEST_LIBS})
+  test_log_rss_usage.cc)
 install(TARGETS ceph_test_log_rss_usage
   DESTINATION ${CMAKE_INSTALL_BINDIR})
 
 # ceph_test_mon_rss_usage
 add_executable(ceph_test_mon_rss_usage
-  test_mon_rss_usage.cc
-  )
-target_link_libraries(ceph_test_mon_rss_usage ${UNITTEST_LIBS})
+  test_mon_rss_usage.cc)
 install(TARGETS ceph_test_mon_rss_usage
   DESTINATION ${CMAKE_INSTALL_BINDIR})