]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
src/pybind/CMakeLists.txt: conditionaly build cython tools
authorWillem Jan Withagen <wjw@digiware.nl>
Sat, 3 Sep 2016 14:23:56 +0000 (16:23 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Wed, 7 Sep 2016 10:44:02 +0000 (12:44 +0200)
 - honor the WITH_RBD and WITH_LIBCEPHFS flags

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/pybind/CMakeLists.txt

index 3d22acd9cfee8675f667d15aad58d0fd3a54d552..137b90643fe46c25fd51b6108fc6c2b679bf8a67 100644 (file)
@@ -12,11 +12,17 @@ foreach(python_version 3 2)  # Keep the default version last
   find_package(Cython REQUIRED)
 
   add_subdirectory(rados rados${PYTHON_VERSION})
-  add_subdirectory(rbd rbd${PYTHON_VERSION})
-  add_subdirectory(cephfs cephfs${PYTHON_VERSION})
-
   add_custom_target(cython${PYTHON_VERSION}_modules ALL
-    DEPENDS cython${PYTHON_VERSION}_rados cython${PYTHON_VERSION}_cephfs cython${PYTHON_VERSION}_rbd)
+    DEPENDS cython${PYTHON_VERSION}_rados)
+
+  if(WITH_RBD)
+    add_subdirectory(rbd rbd${PYTHON_VERSION})
+    add_dependencies(cython${PYTHON_VERSION}_modules cython${PYTHON_VERSION}_rbd)
+  endif()
+  if(WITH_CEPHFS)
+    add_subdirectory(cephfs cephfs${PYTHON_VERSION})
+    add_dependencies(cython${PYTHON_VERSION}_modules cython${PYTHON_VERSION}_cephfs)
+  endif()
 
   # if CMAKE_INSTALL_PREFIX is an empty string, must replace
   # it with "/" to make PYTHON_INSTALL_TEMPLATE an absolute path to be