From 19fcec84d8d7d21e796c7624e521b60d28ee21ed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:45:59 +0200 Subject: Adding upstream version 16.2.11+ds. Signed-off-by: Daniel Baumann --- cmake/modules/FindCython.cmake | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 cmake/modules/FindCython.cmake (limited to 'cmake/modules/FindCython.cmake') diff --git a/cmake/modules/FindCython.cmake b/cmake/modules/FindCython.cmake new file mode 100644 index 000000000..8eb9e42f4 --- /dev/null +++ b/cmake/modules/FindCython.cmake @@ -0,0 +1,16 @@ +# +# Cython +# + +# Try to run Cython, to make sure it works: +execute_process( + COMMAND ${Python3_EXECUTABLE} -m cython --version + RESULT_VARIABLE cython_result + ERROR_VARIABLE cython_output) +if(cython_result EQUAL 0) + string(REGEX REPLACE "^Cython version ([0-9]+\\.[0-9]+).*" "\\1" CYTHON_VERSION "${cython_output}") +else() + message(SEND_ERROR "Could not find cython${PYTHON_VERSION}: ${cython_output}") +endif() +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Cython${PYTHON_VERSION} DEFAULT_MSG CYTHON_VERSION) -- cgit v1.2.3