From 476f904cbc47f107f92522c01525a3568fd147c0 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 15 Dec 2023 18:18:01 +0800 Subject: [PATCH] cmake: differentiate WITH_CEPHFS from WITH_LIBCEPHFS WITH_CEPHFS is used for enabling the server side of cephfs, i.e., mds, while WITH_LIBCEPHFS is for the client side of it, namely libcephfs and its python bindings. since we have these two different options, in theory, user is allowed to build with WITH_CEPHFS=ON and WITH_LIBCEPHFS=OFF, and in that case, `vstart` should not depend on the non-existent target of cephfs and cython_cephfs. the same applies to the build of cython_cephfs. this is an unusual combination, but it is a valid one. in this change, we * build the python binding only if WITH_LIBCEPHFS is ON * add cephfs and cython_cephfs as dependencies of vstart only if WITH_LIBCEPHFS is ON Signed-off-by: Kefu Chai --- src/pybind/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/CMakeLists.txt b/src/pybind/CMakeLists.txt index b01c49b6215a..fb357700a470 100644 --- a/src/pybind/CMakeLists.txt +++ b/src/pybind/CMakeLists.txt @@ -12,7 +12,7 @@ if(WITH_RBD) add_subdirectory(rbd) add_dependencies(cython_modules cython_rbd) endif() -if(WITH_CEPHFS) +if(WITH_LIBCEPHFS) add_subdirectory(cephfs) add_dependencies(cython_modules cython_cephfs) endif() -- 2.47.3