From 09080d4bc5a4202832f0978667cf3b55bbca8e89 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 25 Jul 2018 21:09:18 +0800 Subject: [PATCH] test: move ceph-dencoder to src/tools as it belongs to ceph-common, not ceph-test. Signed-off-by: Kefu Chai --- src/test/encoding/CMakeLists.txt | 58 ------------------- src/tools/CMakeLists.txt | 58 +++++++++++++++++++ src/{test/encoding => tools}/ceph_dencoder.cc | 0 3 files changed, 58 insertions(+), 58 deletions(-) rename src/{test/encoding => tools}/ceph_dencoder.cc (100%) diff --git a/src/test/encoding/CMakeLists.txt b/src/test/encoding/CMakeLists.txt index 1e0dd7cca8c..e8c57a042c0 100644 --- a/src/test/encoding/CMakeLists.txt +++ b/src/test/encoding/CMakeLists.txt @@ -1,61 +1,3 @@ # scripts add_ceph_test(check-generated.sh ${CMAKE_CURRENT_SOURCE_DIR}/check-generated.sh) add_ceph_test(readable.sh ${CMAKE_CURRENT_SOURCE_DIR}/readable.sh) - -## dencoder -set_source_files_properties( - ${CMAKE_SOURCE_DIR}/src/test/encoding/ceph_dencoder.cc - APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/src/include/ceph_ver.h) - -if(HAS_VTA) - set_source_files_properties(test/encoding/ceph_dencoder.cc - PROPERTIES COMPILE_FLAGS -fno-var-tracking-assignments) -endif() - -set(dencoder_srcs - ceph_dencoder.cc - $) -if(WITH_RADOSGW) - list(APPEND dencoder_srcs - ${CMAKE_SOURCE_DIR}/src/rgw/rgw_dencoder.cc) -endif() - -add_executable(ceph-dencoder ${dencoder_srcs}) - -if(WITH_RADOSGW) - list(APPEND DENCODER_EXTRALIBS - rgw_a - cls_rgw_client) -endif() - -if(WITH_RBD) - list(APPEND DENCODER_EXTRALIBS - cls_rbd_client - rbd_mirror_types - rbd_types - rbd_replay_types) - if(WITH_KRBD) - list(APPEND DENCODER_EXTRALIBS - krbd) - endif() -endif() - -target_link_libraries(ceph-dencoder - global - os - osd - mds - mon - journal - ${DENCODER_EXTRALIBS} - cls_lock_client - cls_refcount_client - cls_log_client - cls_statelog_client - cls_version_client - cls_user_client - cls_journal_client - cls_timeindex_client - ${EXTRALIBS} - ${CMAKE_DL_LIBS}) -install(TARGETS ceph-dencoder DESTINATION bin) diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index e0844ec0c7a..ef7e302e208 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -106,3 +106,61 @@ if(WITH_RBD) add_subdirectory(rbd_ggate) endif() endif(WITH_RBD) + +## dencoder +set_source_files_properties( + ${CMAKE_SOURCE_DIR}/src/test/encoding/ceph_dencoder.cc + APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_BINARY_DIR}/src/include/ceph_ver.h) + +if(HAS_VTA) + set_source_files_properties(test/encoding/ceph_dencoder.cc + PROPERTIES COMPILE_FLAGS -fno-var-tracking-assignments) +endif() + +set(dencoder_srcs + ceph_dencoder.cc + $) +if(WITH_RADOSGW) + list(APPEND dencoder_srcs + ${CMAKE_SOURCE_DIR}/src/rgw/rgw_dencoder.cc) +endif() + +add_executable(ceph-dencoder ${dencoder_srcs}) + +if(WITH_RADOSGW) + list(APPEND DENCODER_EXTRALIBS + rgw_a + cls_rgw_client) +endif() + +if(WITH_RBD) + list(APPEND DENCODER_EXTRALIBS + cls_rbd_client + rbd_mirror_types + rbd_types + rbd_replay_types) + if(WITH_KRBD) + list(APPEND DENCODER_EXTRALIBS + krbd) + endif() +endif() + +target_link_libraries(ceph-dencoder + global + os + osd + mds + mon + journal + ${DENCODER_EXTRALIBS} + cls_lock_client + cls_refcount_client + cls_log_client + cls_statelog_client + cls_version_client + cls_user_client + cls_journal_client + cls_timeindex_client + ${EXTRALIBS} + ${CMAKE_DL_LIBS}) +install(TARGETS ceph-dencoder DESTINATION bin) diff --git a/src/test/encoding/ceph_dencoder.cc b/src/tools/ceph_dencoder.cc similarity index 100% rename from src/test/encoding/ceph_dencoder.cc rename to src/tools/ceph_dencoder.cc -- 2.47.3