Skip to content

Commit

Permalink
pybind: Add CMake support in rados
Browse files Browse the repository at this point in the history
Signed-off-by: Anirudha Bose <[email protected]>
  • Loading branch information
onyb committed Jun 19, 2016
1 parent 8a7da66 commit 9a1d64c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cmake/modules/Distutils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function(distutils_add_cython_module name src)
OPT=\"-DNDEBUG -g -fwrapv -O2 -Wall\"
LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
CYTHON_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR}
CEPH_LIBDIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
CFLAGS=\"-iquote ${CMAKE_SOURCE_DIR}/src/include\"
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py build --build-base ${CYTHON_MODULE_DIR} --verbose
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
Expand All @@ -68,6 +69,7 @@ function(distutils_install_cython_module name)
execute_process(
COMMAND env
CYTHON_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR}
CEPH_LIBDIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
CFLAGS=\"-iquote ${CMAKE_SOURCE_DIR}/src/include\"
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py
build --build-base ${CYTHON_MODULE_DIR} --verbose
Expand Down
2 changes: 1 addition & 1 deletion src/pybind/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PY_DISTUTILS = \
CFLAGS="-iquote \${abs_srcdir}/include ${AM_CFLAGS} ${PYTHON_CFLAGS}" \
LDFLAGS="-L\${abs_builddir}/.libs $(subst -pie,,${AM_LDFLAGS}) ${PYTHON_LDFLAGS}" \
CYTHON_BUILD_DIR=$(CYTHON_BUILD_DIR) \
CEPH_LIB_DIR="$(abs_builddir)/.libs" \
CEPH_LIBDIR="$(abs_builddir)/.libs" \
${PYTHON} ./setup.py

if WITH_RADOS
Expand Down
2 changes: 1 addition & 1 deletion src/pybind/rados/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def check_sanity():
)

compiler.add_include_dir(os.path.join(CEPH_SRC_DIR, 'include'))
compiler.add_library_dir(os.environ['CEPH_LIB_DIR'])
compiler.add_library_dir(os.environ.get('CEPH_LIBDIR'))

try:
compiler.link_executable(
Expand Down

0 comments on commit 9a1d64c

Please sign in to comment.