Fixed cmake so that it really defines CYTHON_EXECUTABLE (instead of just threatening to do so). This has the side-benefit that compilation now works from within eclipse.
parent
17c4c2ff19
commit
81bb1d445a
|
@ -4,8 +4,9 @@
|
||||||
#
|
#
|
||||||
# This code sets the following variables:
|
# This code sets the following variables:
|
||||||
#
|
#
|
||||||
# CYTHON_EXECUTABLE
|
|
||||||
# CYTHON_FOUND
|
# CYTHON_FOUND
|
||||||
|
# CYTHON_PATH
|
||||||
|
# CYTHON_EXECUTABLE
|
||||||
# CYTHON_VERSION
|
# CYTHON_VERSION
|
||||||
#
|
#
|
||||||
# See also UseCython.cmake
|
# See also UseCython.cmake
|
||||||
|
@ -38,6 +39,15 @@ if ( PYTHONINTERP_FOUND )
|
||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
# RESULT=0 means ok
|
||||||
|
if ( NOT RESULT )
|
||||||
|
get_filename_component( _python_path ${PYTHON_EXECUTABLE} PATH )
|
||||||
|
find_program( CYTHON_EXECUTABLE
|
||||||
|
NAMES cython cython.bat cython3
|
||||||
|
HINTS ${_python_path}
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
|
||||||
# RESULT=0 means ok
|
# RESULT=0 means ok
|
||||||
if ( NOT RESULT )
|
if ( NOT RESULT )
|
||||||
execute_process( COMMAND "${PYTHON_EXECUTABLE}" "-c"
|
execute_process( COMMAND "${PYTHON_EXECUTABLE}" "-c"
|
||||||
|
@ -59,6 +69,7 @@ find_package_handle_standard_args( Cython
|
||||||
CYTHON_FOUND
|
CYTHON_FOUND
|
||||||
REQUIRED_VARS
|
REQUIRED_VARS
|
||||||
CYTHON_PATH
|
CYTHON_PATH
|
||||||
|
CYTHON_EXECUTABLE
|
||||||
VERSION_VAR
|
VERSION_VAR
|
||||||
CYTHON_VERSION
|
CYTHON_VERSION
|
||||||
)
|
)
|
||||||
|
|
|
@ -52,7 +52,7 @@ function(pyx_to_cpp target pyx_file generated_cpp include_dirs)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${generated_cpp}
|
OUTPUT ${generated_cpp}
|
||||||
COMMAND
|
COMMAND
|
||||||
cython -v --cplus ${includes_for_cython} ${pyx_file} -o ${generated_cpp}
|
${CYTHON_EXECUTABLE} -a -v --cplus ${includes_for_cython} ${pyx_file} -o ${generated_cpp}
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
add_custom_target(${target} ALL DEPENDS ${generated_cpp})
|
add_custom_target(${target} ALL DEPENDS ${generated_cpp})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
Loading…
Reference in New Issue