1
0
mirror of https://github.com/ceph/ceph synced 2024-12-18 17:37:38 +00:00
ceph/cmake/modules/FindCython.cmake
Oleh Prypin 5683a8259b cmake: Also build Python bindings for Python 3
Signed-off-by: Oleh Prypin <oleh@pryp.in>
2016-08-11 16:36:57 +03:00

27 lines
754 B
CMake

#
# Cython
#
SET(Cython${PYTHON_VERSION}_FOUND FALSE)
# Try to run Cython, to make sure it works:
execute_process(
COMMAND ${PYTHON${PYTHON_VERSION}_EXECUTABLE} -m cython --version
RESULT_VARIABLE CYTHON_RESULT
OUTPUT_QUIET
ERROR_QUIET
)
if (CYTHON_RESULT EQUAL 0)
SET(Cython${PYTHON_VERSION}_FOUND TRUE)
endif (CYTHON_RESULT EQUAL 0)
IF (Cython${PYTHON_VERSION}_FOUND)
IF (NOT Cython_FIND_QUIETLY)
MESSAGE(STATUS "Found cython${PYTHON_VERSION}")
ENDIF (NOT Cython_FIND_QUIETLY)
ELSE (Cython${PYTHON_VERSION}_FOUND)
IF (Cython_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find cython${PYTHON_VERSION}. Please install Cython.")
ENDIF (Cython_FIND_REQUIRED)
ENDIF (Cython${PYTHON_VERSION}_FOUND)