From: Willem Jan Withagen Date: Sat, 3 Sep 2016 14:23:56 +0000 (+0200) Subject: src/pybind/CMakeLists.txt: conditionaly build cython tools X-Git-Tag: v11.0.1~305^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1ce0e75c55e40d3f7d2b22b2742aadfa71cab82d;p=ceph-ci.git src/pybind/CMakeLists.txt: conditionaly build cython tools - honor the WITH_RBD and WITH_LIBCEPHFS flags Signed-off-by: Willem Jan Withagen --- diff --git a/src/pybind/CMakeLists.txt b/src/pybind/CMakeLists.txt index 3d22acd9cfe..137b90643fe 100644 --- a/src/pybind/CMakeLists.txt +++ b/src/pybind/CMakeLists.txt @@ -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