4
4
5
5
# This finds the "cython" executable in your PATH, and then in some standard
6
6
# paths:
7
- SET (CYTHON_BIN cython CACHE STRING "Cython executable name" )
7
+
8
+ find_program (CYTHON_BIN NAMES cython cython3 cython2 )
8
9
SET (CYTHON_FLAGS --cplus --fast-fail )
9
10
10
11
SET (Cython_FOUND FALSE )
@@ -27,21 +28,22 @@ ENDIF (CYTHON_BIN)
27
28
28
29
29
30
IF (Cython_FOUND )
30
- IF (NOT Cython_FIND_QUIETLY )
31
- MESSAGE (STATUS "Found CYTHON: ${CYTHON_BIN} " )
32
- ENDIF (NOT Cython_FIND_QUIETLY )
31
+ IF (NOT Cython_FIND_QUIETLY )
32
+ MESSAGE (STATUS "Found CYTHON: ${CYTHON_BIN} " )
33
+ ENDIF (NOT Cython_FIND_QUIETLY )
33
34
ELSE (Cython_FOUND )
34
- IF (Cython_FIND_REQUIRED )
35
+ IF (Cython_FIND_REQUIRED )
35
36
if (Cython_Compilation_Failed )
36
37
MESSAGE (STATUS "Found CYTHON: ${CYTHON_BIN} " )
37
- # On Win the testing of Cython does not return any accessible value, so the test is not carried out. Fresh Cython install was tested and works.
38
- IF (NOT MSVC )
39
- MESSAGE (FATAL_ERROR "Your Cython version is too old. Please upgrade Cython." )
40
- ENDIF (NOT MSVC )
38
+ # On Win the testing of Cython does not return any accessible value, so the test is not carried out.
39
+ # Fresh Cython install was tested and works.
40
+ IF (NOT MSVC )
41
+ MESSAGE (FATAL_ERROR "Your Cython version is too old. Please upgrade Cython." )
42
+ ENDIF (NOT MSVC )
41
43
else (Cython_Compilation_Failed )
42
44
MESSAGE (FATAL_ERROR "Could not find Cython. Please install Cython." )
43
45
endif (Cython_Compilation_Failed )
44
- ENDIF (Cython_FIND_REQUIRED )
46
+ ENDIF (Cython_FIND_REQUIRED )
45
47
ENDIF (Cython_FOUND )
46
48
47
49
0 commit comments