find correct interpreter version before looking for cython

release/4.3a0
Matthew Broadway 2019-03-06 10:00:13 +00:00
parent 9c1dfd244f
commit dc80bc0755
1 changed files with 6 additions and 1 deletions

View File

@ -29,7 +29,12 @@
# Use the Cython executable that lives next to the Python executable
# if it is a local installation.
find_package( PythonInterp )
if(GTSAM_PYTHON_VERSION STREQUAL "Default")
find_package(PythonInterp)
else()
find_package(PythonInterp ${GTSAM_PYTHON_VERSION} EXACT)
endif()
if ( PYTHONINTERP_FOUND )
execute_process( COMMAND "${PYTHON_EXECUTABLE}" "-c"
"import Cython; print(Cython.__path__[0])"