File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 5656endif ()
5757
5858if (CYTHON_EXECUTABLE)
59- set (CYTHON_version_command ${CYTHON_EXECUTABLE} --version )
59+ set (CYTHON_version_command " ${CYTHON_EXECUTABLE} " --version )
6060
6161 execute_process (COMMAND ${CYTHON_version_command}
6262 OUTPUT_VARIABLE CYTHON_version_output
@@ -69,14 +69,12 @@ if(CYTHON_EXECUTABLE)
6969 set (_error_msg "Command \" ${CYTHON_version_command} \" failed with" )
7070 set (_error_msg "${_error_msg} output:\n ${CYTHON_version_error} " )
7171 message (SEND_ERROR "${_error_msg} " )
72+ elseif ("${CYTHON_version_output} " MATCHES "^[Cc]ython version ([^,]+)" )
73+ set (CYTHON_VERSION "${CMAKE_MATCH_1} " )
74+ elseif ("${CYTHON_version_error} " MATCHES "^[Cc]ython version ([^,]+)" )
75+ set (CYTHON_VERSION "${CMAKE_MATCH_1} " )
7276 else ()
73- if ("${CYTHON_version_output} " MATCHES "^[Cc]ython version ([^,]+)" )
74- set (CYTHON_VERSION "${CMAKE_MATCH_1} " )
75- else ()
76- if ("${CYTHON_version_error} " MATCHES "^[Cc]ython version ([^,]+)" )
77- set (CYTHON_VERSION "${CMAKE_MATCH_1} " )
78- endif ()
79- endif ()
77+ message (SEND_ERROR "Invalid Cython version output" )
8078 endif ()
8179endif ()
8280
You can’t perform that action at this time.
0 commit comments