-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFindCython.cmake
More file actions
26 lines (23 loc) · 754 Bytes
/
Copy pathFindCython.cmake
File metadata and controls
26 lines (23 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#
# 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)