From 52be40e256b1f52e2b7a87f1196f0892c49d367d Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Wed, 3 Jul 2024 14:52:01 -0400 Subject: [PATCH] cmake/os: remove WITH_ZFS option when enabled and found, the os_zfs_objs target would reference a missing file filestore/ZFSFileStoreBackend.cc and cmake would fail to configure i take this to mean that WITH_ZFS was accidentally left over from filestore's removal. drop all references to WITH_ZFS, along with the corresponding Findzfs.cmake script Signed-off-by: Casey Bodley --- CMakeLists.txt | 6 ------ cmake/modules/Findzfs.cmake | 28 ---------------------------- src/os/CMakeLists.txt | 13 ------------- 3 files changed, 47 deletions(-) delete mode 100644 cmake/modules/Findzfs.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index a6e7c0b3d6d..4d14300cdfb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -242,12 +242,6 @@ if(WITH_XFS) set(HAVE_LIBXFS ${XFS_FOUND}) endif() -option(WITH_ZFS "enable LibZFS if found" OFF) -if(WITH_ZFS) - find_package(zfs) - set(HAVE_LIBZFS ${ZFS_FOUND}) -endif() - option(WITH_BLUESTORE "Bluestore OSD backend" ON) if(WITH_BLUESTORE) if(LINUX) diff --git a/cmake/modules/Findzfs.cmake b/cmake/modules/Findzfs.cmake deleted file mode 100644 index d92dd1fb04c..00000000000 --- a/cmake/modules/Findzfs.cmake +++ /dev/null @@ -1,28 +0,0 @@ -# find libzfs or libzfslinux -# Once done, this will define -# -# ZFS_FOUND - system has libzfs -# ZFS_INCLUDE_DIR - the libzfs include directories -# ZFS_LIBRARIES - link these to use libzfs - -find_package(PkgConfig) -if(PKG_CONFIG_FOUND) - pkg_check_modules(ZFS QUIET libzfs) -else() - find_path(ZFS_INCLUDE_DIR libzfs.h - HINTS - ENV ZFS_DIR - PATH_SUFFIXES libzfs) - - find_library(ZFS_LIBRARIES - NAMES zfs - HINTS - ENV ZFS_DIR) - set(XFS_LIBRARIES ${LIBXFS}) -endif() - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(zfs DEFAULT_MSG - ZFS_INCLUDE_DIRS ZFS_LIBRARIES) - -mark_as_advanced(ZFS_INCLUDE_DIRS XFS_LIBRARIES) diff --git a/src/os/CMakeLists.txt b/src/os/CMakeLists.txt index a27b64688d8..67770933a3d 100644 --- a/src/os/CMakeLists.txt +++ b/src/os/CMakeLists.txt @@ -37,15 +37,6 @@ if(HAVE_LIBXFS) fs/XFS.cc) endif() -if(HAVE_LIBZFS) - add_library(os_zfs_objs OBJECT - filestore/ZFSFileStoreBackend.cc - fs/ZFS.cc) - target_include_directories(os_zfs_objs SYSTEM PRIVATE - ${ZFS_INCLUDE_DIRS}) - list(APPEND libos_srcs $) -endif() - add_library(os STATIC ${libos_srcs}) target_link_libraries(os legacy-option-headers @@ -66,10 +57,6 @@ if(WITH_FUSE) target_link_libraries(os FUSE::FUSE) endif() -if(HAVE_LIBZFS) - target_link_libraries(os ${ZFS_LIBRARIES}) -endif() - if(WITH_LTTNG) add_dependencies(os objectstore-tp) add_dependencies(os bluestore-tp) -- 2.39.5