]> git.proxmox.com Git - ceph.git/blame - ceph/cmake/modules/FindCython.cmake
import ceph quincy 17.2.1
[ceph.git] / ceph / cmake / modules / FindCython.cmake
CommitLineData
7c673cae
FG
1#
2# Cython
3#
4
7c673cae
FG
5# Try to run Cython, to make sure it works:
6execute_process(
9f95a23c 7 COMMAND ${Python3_EXECUTABLE} -m cython --version
11fdf7f2
TL
8 RESULT_VARIABLE cython_result
9 ERROR_VARIABLE cython_output)
10if(cython_result EQUAL 0)
11 string(REGEX REPLACE "^Cython version ([0-9]+\\.[0-9]+).*" "\\1" CYTHON_VERSION "${cython_output}")
12else()
13 message(SEND_ERROR "Could not find cython${PYTHON_VERSION}: ${cython_output}")
14endif()
15include(FindPackageHandleStandardArgs)
16find_package_handle_standard_args(Cython${PYTHON_VERSION} DEFAULT_MSG CYTHON_VERSION)