Skip to content
Snippets Groups Projects
Commit 75ade39e authored by Bienchen's avatar Bienchen
Browse files

Fixed issue in FindPython: requested Python version was only tested to be...

Fixed issue in FindPython: requested Python version was only tested to be bigger than requirement, not equal to
parent 8fc60a0c
No related branches found
No related tags found
No related merge requests found
...@@ -96,7 +96,8 @@ macro(check_for_python_lib) ...@@ -96,7 +96,8 @@ macro(check_for_python_lib)
_find_python("${PYTHON_ROOT}" "${PYTHON_VERSION}") _find_python("${PYTHON_ROOT}" "${PYTHON_VERSION}")
else() else()
foreach(_VERSION ${PYTHON_VERSIONS}) foreach(_VERSION ${PYTHON_VERSIONS})
if(${PYTHON_MIN_VERSION} VERSION_LESS ${_VERSION}) if((${PYTHON_MIN_VERSION} VERSION_LESS ${_VERSION}) OR
(${PYTHON_MIN_VERSION} VERSION_EQUAL ${_VERSION}))
_find_python("${PYTHON_ROOT}" "${_VERSION}") _find_python("${PYTHON_ROOT}" "${_VERSION}")
if(PYTHON_LIBRARIES) if(PYTHON_LIBRARIES)
set(PYTHON_VERSION "${_VERSION}") set(PYTHON_VERSION "${_VERSION}")
...@@ -116,7 +117,8 @@ macro(check_for_python_binary) ...@@ -116,7 +117,8 @@ macro(check_for_python_binary)
_find_python_bin("${PYTHON_ROOT}" "${PYTHON_VERSION}") _find_python_bin("${PYTHON_ROOT}" "${PYTHON_VERSION}")
else() else()
foreach(_VERSION ${PYTHON_VERSIONS}) foreach(_VERSION ${PYTHON_VERSIONS})
if(${PYTHON_MIN_VERSION} VERSION_LESS ${_VERSION}) if((${PYTHON_MIN_VERSION} VERSION_LESS ${_VERSION}) OR
(${PYTHON_MIN_VERSION} VERSION_EQUAL ${_VERSION}))
_find_python_bin("${PYTHON_ROOT}" "${_VERSION}") _find_python_bin("${PYTHON_ROOT}" "${_VERSION}")
if(PYTHON_BINARY) if(PYTHON_BINARY)
set(PYTHON_VERSION "${_VERSION}") set(PYTHON_VERSION "${_VERSION}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment