File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,6 @@ if(CMAKE_VERSION VERSION_LESS "3.7")
7676 message (FATAL_ERROR "CMake 3.7 required for DEPFILE" )
7777endif ()
7878
79-
8079function (Cython_compile_pyx)
8180 cmake_parse_arguments (
8281 PARSE_ARGV 0
@@ -92,6 +91,16 @@ function(Cython_compile_pyx)
9291 endif ()
9392 list (GET ALL_INPUT 0 INPUT )
9493
94+ if (DEFINED CYTHON_EXECUTABLE)
95+ set (_cython_command "\" ${CYTHON_EXECUTABLE} \" " )
96+ elseif (DEFINED Python_EXECUTABLE)
97+ set (_cython_command "\" ${Python_EXECUTABLE} \" -m cython" )
98+ elseif (DEFINED Python3_EXECUTABLE)
99+ set (_cython_command "\" ${Python3_EXECUTABLE} \" -m cython" )
100+ else ()
101+ message (FATAL_ERROR "Cython executable not found" )
102+ endif ()
103+
95104 # Set target language
96105 if (NOT CYTHON_LANGUAGE)
97106 get_property (_languages GLOBAL PROPERTY ENABLED_LANGUAGES )
@@ -164,7 +173,7 @@ function(Cython_compile_pyx)
164173 "${CYTHON_OUTPUT} "
165174 "${depfile_path} "
166175 COMMAND
167- Cython::Cython
176+ ${_cython_command}
168177 ${language_arg}
169178 ${CYTHON_CYTHON_ARGS}
170179 --depfile
You can’t perform that action at this time.
0 commit comments