From: Kefu Chai Date: Thu, 26 Oct 2017 11:42:00 +0000 (+0800) Subject: cmake: link librados tests against librados.so X-Git-Tag: v13.0.1~396^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=082876f4c7e707da076745a2152180c3f2bae11a;p=ceph.git cmake: link librados tests against librados.so * in hope to shrink the test, and the debug-info rpm package * also add librados to radostest's target_link_libraries(), otherwise we might run into linker order issue, like Undefined reference in /home/jenkins-build/build/workspace/ceph-pull-requests/src/test/librados/test.cc:61 to `rados_application_enable' Signed-off-by: Kefu Chai --- diff --git a/src/test/librados/CMakeLists.txt b/src/test/librados/CMakeLists.txt index d97d1027118..313eeea50ed 100644 --- a/src/test/librados/CMakeLists.txt +++ b/src/test/librados/CMakeLists.txt @@ -6,7 +6,7 @@ set(libradostest_srcs add_library(radostest STATIC ${libradostest_srcs} $) -target_link_libraries(radostest ceph-common json_spirit ${EXTRALIBS}) +target_link_libraries(radostest librados ceph-common json_spirit ${EXTRALIBS}) set_target_properties(radostest PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) # ceph_test_rados_api_cmd @@ -16,7 +16,7 @@ add_executable(ceph_test_rados_api_cmd set_target_properties(ceph_test_rados_api_cmd PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) target_link_libraries(ceph_test_rados_api_cmd - rados_a global ${UNITTEST_LIBS} radostest) + librados ${UNITTEST_LIBS} radostest) # ceph_test_rados_api_io add_executable(ceph_test_rados_api_io @@ -62,7 +62,7 @@ add_executable(ceph_test_rados_api_list set_target_properties(ceph_test_rados_api_list PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) target_link_libraries(ceph_test_rados_api_list - rados_a global ${UNITTEST_LIBS} radostest) + librados global ${UNITTEST_LIBS} radostest) # ceph_test_rados_api_pool add_executable(ceph_test_rados_api_pool @@ -72,7 +72,7 @@ set_target_properties(ceph_test_rados_api_pool PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS} ) target_link_libraries(ceph_test_rados_api_pool - rados_a ${UNITTEST_LIBS} radostest) + librados ${UNITTEST_LIBS} radostest) # ceph_test_rados_api_stat add_executable(ceph_test_rados_api_stat @@ -81,7 +81,7 @@ add_executable(ceph_test_rados_api_stat set_target_properties(ceph_test_rados_api_stat PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) target_link_libraries(ceph_test_rados_api_stat - rados_a ${UNITTEST_LIBS} radostest) + librados ${UNITTEST_LIBS} radostest) # ceph_test_rados_api_watch_notify add_executable(ceph_test_rados_api_watch_notify @@ -90,7 +90,7 @@ add_executable(ceph_test_rados_api_watch_notify set_target_properties(ceph_test_rados_api_watch_notify PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) target_link_libraries(ceph_test_rados_api_watch_notify - rados_a ${UNITTEST_LIBS} radostest) + librados ${UNITTEST_LIBS} radostest) # ceph_test_rados_api_cls add_executable(ceph_test_rados_api_cls @@ -99,7 +99,7 @@ add_executable(ceph_test_rados_api_cls set_target_properties(ceph_test_rados_api_cls PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) target_link_libraries(ceph_test_rados_api_cls - rados_a ${UNITTEST_LIBS} radostest) + librados ${UNITTEST_LIBS} radostest) # ceph_test_rados_api_misc add_executable(ceph_test_rados_api_misc @@ -109,7 +109,7 @@ add_executable(ceph_test_rados_api_misc set_target_properties(ceph_test_rados_api_misc PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) target_link_libraries(ceph_test_rados_api_misc - rados_a global ${UNITTEST_LIBS} radostest) + librados global ${UNITTEST_LIBS} radostest) # ceph_test_rados_api_lock add_executable(ceph_test_rados_api_lock @@ -118,7 +118,7 @@ add_executable(ceph_test_rados_api_lock set_target_properties(ceph_test_rados_api_lock PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) target_link_libraries(ceph_test_rados_api_lock - rados_a ${UNITTEST_LIBS} radostest) + librados ${UNITTEST_LIBS} radostest) # ceph_test_rados_api_service add_executable(ceph_test_rados_api_service @@ -127,7 +127,7 @@ add_executable(ceph_test_rados_api_service set_target_properties(ceph_test_rados_api_service PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) target_link_libraries(ceph_test_rados_api_service - rados_a global ${UNITTEST_LIBS} radostest) + librados global ${UNITTEST_LIBS} radostest) # ceph_test_rados_api_tier add_executable(ceph_test_rados_api_tier @@ -137,7 +137,7 @@ add_executable(ceph_test_rados_api_tier set_target_properties(ceph_test_rados_api_tier PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) target_link_libraries(ceph_test_rados_api_tier - global rados_a ${UNITTEST_LIBS} Boost::system radostest) + librados global ${UNITTEST_LIBS} Boost::system radostest) # ceph_test_rados_api_snapshots add_executable(ceph_test_rados_api_snapshots @@ -146,7 +146,7 @@ add_executable(ceph_test_rados_api_snapshots set_target_properties(ceph_test_rados_api_snapshots PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS}) target_link_libraries(ceph_test_rados_api_snapshots - rados_a ${UNITTEST_LIBS} radostest) + librados ${UNITTEST_LIBS} radostest) install(TARGETS ceph_test_rados_api_aio