Merge pull request #9058 from dillaman/wip-cmake-test-rbd-mirror

cmake: fix rbd compile errors

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2016-05-11 19:42:20 +08:00
commit e2fa841887
4 changed files with 12 additions and 1 deletions

View File

@ -1041,6 +1041,7 @@ if(${WITH_RBD})
tools/rbd_mirror/image_sync/ImageCopyRequest.cc
tools/rbd_mirror/image_sync/ObjectCopyRequest.cc
tools/rbd_mirror/image_sync/SnapshotCopyRequest.cc
tools/rbd_mirror/image_sync/SnapshotCreateRequest.cc
tools/rbd_mirror/image_sync/SyncPointCreateRequest.cc
tools/rbd_mirror/image_sync/SyncPointPruneRequest.cc)
add_library(rbd_mirror_internal STATIC ${rbd_mirror_internal})

View File

@ -1,3 +1,10 @@
set(journal_test
mock/MockJournaler.cc
)
add_library(journal_test STATIC ${journal_test})
set_target_properties(journal_test PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
# unittest_journal
set(unittest_journal_srcs
test_main.cc

View File

@ -39,6 +39,8 @@ set(unittest_librbd_srcs
operation/test_mock_SnapshotRemoveRequest.cc
operation/test_mock_SnapshotRollbackRequest.cc
operation/test_mock_SnapshotUnprotectRequest.cc
mock/MockImageCtx.cc
mock/MockJournal.cc
)
add_executable(unittest_librbd EXCLUDE_FROM_ALL
${unittest_librbd_srcs}
@ -55,6 +57,7 @@ target_link_libraries(unittest_librbd
cls_lock
cls_lock_client
journal
journal_test
cls_journal
cls_journal_client
rados_test_stub

View File

@ -19,7 +19,6 @@ add_executable(unittest_rbd_mirror EXCLUDE_FROM_ALL
image_sync/test_mock_SnapshotCopyRequest.cc
image_sync/test_mock_SyncPointCreateRequest.cc
image_sync/test_mock_SyncPointPruneRequest.cc
mock/MockJournaler.cc
${CMAKE_SOURCE_DIR}/src/common/ContextCompletion.cc
)
add_ceph_unittest(unittest_rbd_mirror ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_rbd_mirror)
@ -32,6 +31,7 @@ target_link_libraries(unittest_rbd_mirror
rbd_internal
rbd_api
journal
journal_test
cls_rbd_client
cls_lock_client
cls_journal_client