From: Kefu Chai Date: Thu, 8 Feb 2018 15:26:22 +0000 (+0800) Subject: cmake: depend on the right version of python bindings X-Git-Tag: v13.0.2~257^2~6 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c8baadf3c09bc3628192048beef96c1fd6310f64;p=ceph.git cmake: depend on the right version of python bindings Signed-off-by: Kefu Chai --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9651c75041f81..aec0681ced3ed 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -274,6 +274,14 @@ if(WITH_PYTHON3) find_package(Python3Libs 3 REQUIRED) endif() +# the major version of the python bindings as a dependency of other +# targets +if(WITH_PYTHON2) + set(PY_BINDING_INFIX "") +else() + set(PY_BINDING_INFIX 3) +endif() + if(HAVE_XIO) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${XIO_INCLUDE_DIR}") list(APPEND EXTRALIBS ${XIO_LIBRARY} pthread) @@ -1089,13 +1097,12 @@ add_custom_target(vstart-base DEPENDS monmaptool crushtool rados - cython_rados - ) + cython${PY_BINDING_INFIX}_rados) add_custom_target(vstart DEPENDS vstart-base ceph-mds - cython_rbd) + cython${PY_BINDING_INFIX}_rbd) if(WITH_RADOSGW) add_dependencies(vstart radosgw radosgw-admin) endif(WITH_RADOSGW) @@ -1108,7 +1115,7 @@ endif(WITH_LTTNG) add_custom_target(cephfs_testing DEPENDS vstart rados - cython_modules + cython${PY_BINDING_INFIX}_modules cephfs cls_cephfs ceph-fuse