]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: add an arg for name of cython extension
authorKefu Chai <kchai@redhat.com>
Mon, 8 Jul 2019 11:32:49 +0000 (19:32 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 8 Jul 2019 11:32:51 +0000 (19:32 +0800)
so we can deduce the path of cython extension

Signed-off-by: Kefu Chai <kchai@redhat.com>
cmake/modules/Distutils.cmake
src/pybind/cephfs/CMakeLists.txt
src/pybind/rados/CMakeLists.txt
src/pybind/rbd/CMakeLists.txt
src/pybind/rgw/CMakeLists.txt

index f70265fe4c7afc2fc81adc53ae06a464a12a9790..a5d1f4660de7eb585bbda475ce739f22ef389236 100644 (file)
@@ -33,7 +33,7 @@ function(distutils_install_module name)
     WORKING_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}\")")
 endfunction(distutils_install_module)
 
-function(distutils_add_cython_module name src)
+function(distutils_add_cython_module target name src)
   get_property(compiler_launcher GLOBAL PROPERTY RULE_LAUNCH_COMPILE)
   get_property(link_launcher GLOBAL PROPERTY RULE_LAUNCH_LINK)
   # When using ccache, CMAKE_C_COMPILER is ccache executable absolute path
@@ -56,7 +56,7 @@ function(distutils_add_cython_module name src)
   set(PY_CC ${compiler_launcher} ${CMAKE_C_COMPILER} ${c_compiler_arg1} ${cflags})
   set(PY_CXX ${compiler_launcher} ${CMAKE_CXX_COMPILER} ${cxx_compiler_arg1})
   set(PY_LDSHARED ${link_launcher} ${CMAKE_C_COMPILER} ${c_compiler_arg1} "-shared")
-  add_custom_target(${name} ALL
+  add_custom_target(${target} ALL
     COMMAND
     env
     CC="${PY_CC}"
index 6d4a22b32f9faab4e6bac6d028285f538a6a7748..380ec21fc070ff3e4f706f28554b5e43fb516523 100644 (file)
@@ -1,3 +1,5 @@
-distutils_add_cython_module(cython${PYTHON_VERSION}_cephfs ${CMAKE_CURRENT_SOURCE_DIR}/cephfs.pyx)
+distutils_add_cython_module(cython${PYTHON_VERSION}_cephfs
+  cephfs
+  ${CMAKE_CURRENT_SOURCE_DIR}/cephfs.pyx)
 add_dependencies(cython${PYTHON_VERSION}_cephfs cephfs)
 distutils_install_cython_module(cython${PYTHON_VERSION}_cephfs)
index 7b14c0e0425cf4d831c096e9564aa2f4b7ee29ce..a8ed22550f964b8a91dbc5a9fe936003b8a1df45 100644 (file)
@@ -1,3 +1,5 @@
-distutils_add_cython_module(cython${PYTHON_VERSION}_rados ${CMAKE_CURRENT_SOURCE_DIR}/rados.pyx)
+distutils_add_cython_module(cython${PYTHON_VERSION}_rados
+  rados
+  ${CMAKE_CURRENT_SOURCE_DIR}/rados.pyx)
 add_dependencies(cython${PYTHON_VERSION}_rados rados)
 distutils_install_cython_module(cython${PYTHON_VERSION}_rados)
index fee56ec40af1f4a01e6bb85ddb05adc58b5e30c3..4920e0ff1eeed8a7f0cea02d770fca96a3d4586e 100644 (file)
@@ -1,3 +1,5 @@
-distutils_add_cython_module(cython${PYTHON_VERSION}_rbd ${CMAKE_CURRENT_SOURCE_DIR}/rbd.pyx)
+distutils_add_cython_module(cython${PYTHON_VERSION}_rbd
+  rbd
+  ${CMAKE_CURRENT_SOURCE_DIR}/rbd.pyx)
 add_dependencies(cython${PYTHON_VERSION}_rbd librbd)
 distutils_install_cython_module(cython${PYTHON_VERSION}_rbd)
index da2cdcdf87f31a3006f4dc34c833ac006c7a9122..811af61288dd382c2aa770880969768bb2e6d6c0 100644 (file)
@@ -1,3 +1,5 @@
-distutils_add_cython_module(cython${PYTHON_VERSION}_rgw ${CMAKE_CURRENT_SOURCE_DIR}/rgw.pyx)
+distutils_add_cython_module(cython${PYTHON_VERSION}_rgw
+  rgw
+  ${CMAKE_CURRENT_SOURCE_DIR}/rgw.pyx)
 add_dependencies(cython${PYTHON_VERSION}_rgw rgw)
 distutils_install_cython_module(cython${PYTHON_VERSION}_rgw)