test/rgw: don't compile POSIX test unless enabled

Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
This commit is contained in:
Leonid Usov 2023-10-08 17:14:23 +03:00
parent 03e43c5bb0
commit b18174d96a

View File

@ -316,13 +316,15 @@ target_link_libraries(radosgw-cr-test ${rgw_libs} librados
${CURL_LIBRARIES} ${EXPAT_LIBRARIES} ${BLKID_LIBRARIES}
GTest::GTest)
# unittest_posix_bucket_cache
add_executable(unittest_posix_bucket_cache
test_posix_bucket_cache.cc)
add_ceph_unittest(unittest_posix_bucket_cache)
target_compile_definitions(unittest_posix_bucket_cache PUBLIC LMDB_SAFE_NO_CPP_UTILITIES)
target_include_directories(unittest_posix_bucket_cache
SYSTEM PRIVATE "${CMAKE_SOURCE_DIR}/src/rgw"
SYSTEM PRIVATE "${CMAKE_SOURCE_DIR}/src/rgw/driver/posix")
target_link_libraries(unittest_posix_bucket_cache ${UNITTEST_LIBS}
${rgw_libs} ${LMDB_LIBRARIES})
if(WITH_RADOSGW_POSIX)
# unittest_posix_bucket_cache
add_executable(unittest_posix_bucket_cache
test_posix_bucket_cache.cc)
add_ceph_unittest(unittest_posix_bucket_cache)
target_compile_definitions(unittest_posix_bucket_cache PUBLIC LMDB_SAFE_NO_CPP_UTILITIES)
target_include_directories(unittest_posix_bucket_cache
SYSTEM PRIVATE "${CMAKE_SOURCE_DIR}/src/rgw"
SYSTEM PRIVATE "${CMAKE_SOURCE_DIR}/src/rgw/driver/posix")
target_link_libraries(unittest_posix_bucket_cache ${UNITTEST_LIBS}
${rgw_libs} ${LMDB_LIBRARIES})
endif(WITH_RADOSGW_POSIX)