From efe5daa1fcb971d002522d486069131ed8aaffb9 Mon Sep 17 00:00:00 2001 From: lixiaoy1 Date: Thu, 10 Dec 2020 04:33:34 -0500 Subject: [PATCH] librbd/cmake: Add missed PWL related types Add PWL related classes into rbd_types. And fix the build issue when both SSD and RWL are enabled. Signed-off-by: Li, Xiaoyan --- src/librbd/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/librbd/CMakeLists.txt b/src/librbd/CMakeLists.txt index dfd7940a4e9..20bfd542796 100644 --- a/src/librbd/CMakeLists.txt +++ b/src/librbd/CMakeLists.txt @@ -9,9 +9,18 @@ set(librbd_types_srcs watcher/Types.cc WatchNotifyTypes.cc) +if(WITH_RBD_RWL OR WITH_RBD_SSD_CACHE) + list(APPEND librbd_types_srcs cache/pwl/Types.cc) +endif() + add_library(rbd_types STATIC ${librbd_types_srcs}) +if (WITH_RBD_RWL AND WITH_RBD_SSD_CACHE) + target_link_libraries(rbd_types + PRIVATE pmem::pmemobj) +endif() + set(librbd_internal_srcs AsioEngine.cc AsyncObjectThrottle.cc -- 2.47.3