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