Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: librbd cleanup #11842

Merged
merged 3 commits into from Nov 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 4 additions & 13 deletions src/librbd/CMakeLists.txt
Expand Up @@ -82,41 +82,32 @@ set(librbd_internal_srcs
operation/SnapshotRollbackRequest.cc
operation/SnapshotUnprotectRequest.cc
operation/SnapshotLimitRequest.cc
operation/TrimRequest.cc)
operation/TrimRequest.cc
${CMAKE_SOURCE_DIR}/src/common/ContextCompletion.cc)

add_library(rbd_api STATIC librbd.cc)
add_library(rbd_internal STATIC
${librbd_internal_srcs}
$<TARGET_OBJECTS:rados_snap_set_diff_obj>)
if(WITH_LTTNG)
add_dependencies(rbd_api librbd-tp)
add_dependencies(rbd_internal librbd-tp)
endif()

add_library(librbd ${CEPH_SHARED}
$<TARGET_OBJECTS:osdc_rbd_objs>
$<TARGET_OBJECTS:common_util_obj>
${CMAKE_SOURCE_DIR}/src/common/ContextCompletion.cc
librbd.cc)
if(LINUX)
list(APPEND librbd
$<TARGET_OBJECTS:parse_secret_objs>
$<TARGET_OBJECTS:krbd_objs>
)
endif(LINUX)

target_link_libraries(librbd LINK_PRIVATE
rbd_internal
rbd_types
journal
librados
common
osdc
cls_rbd_client
cls_lock_client
cls_journal_client
common
pthread
udev
keyutils
${CMAKE_DL_LIBS}
${EXTRALIBS})
if(ENABLE_SHARED)
Expand Down
1 change: 0 additions & 1 deletion src/librbd/internal.cc
Expand Up @@ -43,7 +43,6 @@
#include "librbd/exclusive_lock/AutomaticPolicy.h"
#include "librbd/exclusive_lock/StandardPolicy.h"
#include "librbd/operation/TrimRequest.h"
#include "include/util.h"

#include "journal/Journaler.h"

Expand Down
2 changes: 0 additions & 2 deletions src/test/librbd/CMakeLists.txt
Expand Up @@ -60,7 +60,6 @@ set(unittest_librbd_srcs
)
add_executable(unittest_librbd
${unittest_librbd_srcs}
${CMAKE_SOURCE_DIR}/src/common/ContextCompletion.cc
$<TARGET_OBJECTS:common_texttable_obj>)
target_compile_definitions(unittest_librbd PUBLIC "-DTEST_LIBRBD_INTERNALS")
set_target_properties(unittest_librbd PROPERTIES COMPILE_FLAGS
Expand Down Expand Up @@ -88,7 +87,6 @@ target_link_libraries(unittest_librbd

add_executable(ceph_test_librbd
test_main.cc
${CMAKE_SOURCE_DIR}/src/common/ContextCompletion.cc
$<TARGET_OBJECTS:common_texttable_obj>)
target_link_libraries(ceph_test_librbd
rbd_test
Expand Down
2 changes: 0 additions & 2 deletions src/test/rbd_mirror/CMakeLists.txt
Expand Up @@ -25,7 +25,6 @@ add_executable(unittest_rbd_mirror
image_sync/test_mock_SnapshotCreateRequest.cc
image_sync/test_mock_SyncPointCreateRequest.cc
image_sync/test_mock_SyncPointPruneRequest.cc
${CMAKE_SOURCE_DIR}/src/common/ContextCompletion.cc
)
add_ceph_unittest(unittest_rbd_mirror ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_rbd_mirror)
set_target_properties(unittest_rbd_mirror PROPERTIES COMPILE_FLAGS
Expand Down Expand Up @@ -55,7 +54,6 @@ target_link_libraries(unittest_rbd_mirror

add_executable(ceph_test_rbd_mirror
test_main.cc
${CMAKE_SOURCE_DIR}/src/common/ContextCompletion.cc
)
set_target_properties(ceph_test_rbd_mirror PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
Expand Down
3 changes: 1 addition & 2 deletions src/tools/rbd_mirror/CMakeLists.txt
Expand Up @@ -26,8 +26,7 @@ add_library(rbd_mirror_internal STATIC
${rbd_mirror_internal})

add_executable(rbd-mirror
main.cc
${CMAKE_SOURCE_DIR}/src/common/ContextCompletion.cc)
main.cc)
target_link_libraries(rbd-mirror
rbd_mirror_internal
rbd_api
Expand Down