]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: differentiate WITH_CEPHFS from WITH_LIBCEPHFS 54917/head
authorKefu Chai <tchaikov@gmail.com>
Fri, 15 Dec 2023 10:18:01 +0000 (18:18 +0800)
committerKefu Chai <tchaikov@gmail.com>
Mon, 18 Dec 2023 12:21:39 +0000 (20:21 +0800)
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 <tchaikov@gmail.com>
src/pybind/CMakeLists.txt

index b01c49b6215a55385ceeabbe6cc942d5e487c50e..fb357700a4704619a305041d9c7f1715f3c1b563 100644 (file)
@@ -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()