Skip to content

Commit

Permalink
Merge pull request ceph#56728 from pritha-srivastava/wip-rgw-d4n-comp…
Browse files Browse the repository at this point in the history
…ilation-errors

rgw/d4n: fix compilation issue when WITH_RADOSGW_D4N=OFF.

Reviewed-by: Daniel Gryniewicz <[email protected]>
Reviewed-by: J. Eric Ivancich <[email protected]>
  • Loading branch information
ivancich authored Apr 10, 2024
2 parents 17c90ba + 8bb207a commit 97cb38d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
14 changes: 9 additions & 5 deletions src/rgw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ set(librgw_common_srcs
rgw_role.cc
rgw_sal.cc
rgw_sal_filter.cc
rgw_redis_driver.cc
rgw_ssd_driver.cc
rgw_string.cc
rgw_tag.cc
rgw_tag_s3.cc
Expand Down Expand Up @@ -150,9 +148,6 @@ set(librgw_common_srcs
rgw_tracer.cc
rgw_lua_background.cc
rgw_data_access.cc
driver/d4n/d4n_directory.cc
driver/d4n/d4n_policy.cc
driver/d4n/rgw_sal_d4n.cc
driver/rados/cls_fifo_legacy.cc
driver/rados/rgw_bucket.cc
driver/rados/rgw_bucket_sync.cc
Expand Down Expand Up @@ -247,6 +242,15 @@ if(WITH_RADOSGW_ARROW_FLIGHT)
list(APPEND librgw_common_srcs rgw_flight.cc rgw_flight_frontend.cc)
endif(WITH_RADOSGW_ARROW_FLIGHT)

if(WITH_RADOSGW_D4N)
list(APPEND librgw_common_srcs
rgw_redis_driver.cc
rgw_ssd_driver.cc
driver/d4n/d4n_directory.cc
driver/d4n/d4n_policy.cc
driver/d4n/rgw_sal_d4n.cc)
endif()

add_library(rgw_common STATIC ${librgw_common_srcs})

include(CheckCXXCompilerFlag)
Expand Down
36 changes: 16 additions & 20 deletions src/test/rgw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ add_executable(ceph_test_rgw_d4n_directory
test_d4n_directory.cc
)
target_include_directories(ceph_test_rgw_d4n_directory
PUBLIC "${CMAKE_SOURCE_DIR}/src/dmclock/support/src"
SYSTEM PRIVATE "${CMAKE_SOURCE_DIR}/src/rgw/driver/d4n")
target_link_libraries(ceph_test_rgw_d4n_directory PRIVATE
rgw_common
Expand All @@ -42,7 +41,6 @@ add_executable(ceph_test_rgw_d4n_policy
test_d4n_policy.cc
)
target_include_directories(ceph_test_rgw_d4n_policy
PUBLIC "${CMAKE_SOURCE_DIR}/src/dmclock/support/src"
SYSTEM PRIVATE "${CMAKE_SOURCE_DIR}/src/rgw/")
target_link_libraries(ceph_test_rgw_d4n_policy PRIVATE
rgw_common
Expand All @@ -59,7 +57,6 @@ add_executable(ceph_test_rgw_redis_driver
test_redis_driver.cc
)
target_include_directories(ceph_test_rgw_redis_driver
PUBLIC "${CMAKE_SOURCE_DIR}/src/dmclock/support/src"
SYSTEM PRIVATE "${CMAKE_SOURCE_DIR}/src/rgw/")
target_link_libraries(ceph_test_rgw_redis_driver PRIVATE
rgw_common
Expand All @@ -71,6 +68,22 @@ target_link_libraries(ceph_test_rgw_redis_driver PRIVATE
)
target_link_libraries(ceph_test_rgw_redis_driver PRIVATE spawn)
install(TARGETS ceph_test_rgw_redis_driver DESTINATION ${CMAKE_INSTALL_BINDIR})

add_executable(ceph_test_rgw_ssd_driver
test_ssd_driver.cc
)
target_include_directories(ceph_test_rgw_ssd_driver
SYSTEM PRIVATE "${CMAKE_SOURCE_DIR}/src/rgw/")
target_link_libraries(ceph_test_rgw_ssd_driver PRIVATE
rgw_common
librados
ceph-common
${rgw_libs}
${UNITTEST_LIBS}
${EXTRALIBS}
)
target_link_libraries(ceph_test_rgw_ssd_driver PRIVATE spawn)
install(TARGETS ceph_test_rgw_ssd_driver DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()

#unittest_rgw_bencode
Expand Down Expand Up @@ -119,23 +132,6 @@ add_executable(unittest_rgw_ratelimit test_rgw_ratelimit.cc $<TARGET_OBJECTS:uni
target_link_libraries(unittest_rgw_ratelimit ${rgw_libs})
add_ceph_unittest(unittest_rgw_ratelimit)

add_executable(ceph_test_rgw_ssd_driver
test_ssd_driver.cc
)
target_include_directories(ceph_test_rgw_ssd_driver
PUBLIC "${CMAKE_SOURCE_DIR}/src/dmclock/support/src"
SYSTEM PRIVATE "${CMAKE_SOURCE_DIR}/src/rgw/")
target_link_libraries(ceph_test_rgw_ssd_driver PRIVATE
rgw_common
librados
ceph-common
${rgw_libs}
${UNITTEST_LIBS}
${EXTRALIBS}
)
target_link_libraries(ceph_test_rgw_ssd_driver PRIVATE spawn)
install(TARGETS ceph_test_rgw_ssd_driver DESTINATION ${CMAKE_INSTALL_BINDIR})

# ceph_test_rgw_manifest
set(test_rgw_manifest_srcs test_rgw_manifest.cc)
add_executable(ceph_test_rgw_manifest
Expand Down

0 comments on commit 97cb38d

Please sign in to comment.