Commit f09441fa authored by Jeremy Cohen's avatar Jeremy Cohen

Fix to Python version discovery.

parent 718afce2
...@@ -212,12 +212,19 @@ ENDIF() ...@@ -212,12 +212,19 @@ ENDIF()
# Add option to use Python 3. # Add option to use Python 3.
CMAKE_DEPENDENT_OPTION(NEKTAR_USE_PYTHON3 CMAKE_DEPENDENT_OPTION(NEKTAR_USE_PYTHON3
"If true, prefer to use Python 3." OFF "NEKTAR_USE_PYTHON3" OFF) "If true, prefer to use Python 3." OFF "NEKTAR_BUILD_PYTHON" OFF)
IF (NEKTAR_BUILD_PYTHON) IF (NEKTAR_BUILD_PYTHON)
# Unset any existing python executable/library settings so that
# we can rediscover correct python version if v2/3 settings changed
unset(PYTHON_EXECUTABLE CACHE)
unset(PYTHON_INCLUDE_DIR CACHE)
unset(PYTHON_LIBRARY CACHE)
unset(PYTHON_LIBRARY_DEBUG CACHE)
SET(PYTHONVER 2.7) SET(PYTHONVER 2.7)
IF (NEKTAR_USE_PYTHON3) IF (NEKTAR_USE_PYTHON3)
SET(PYTHONVER 3) SET(PYTHONVER 3.0)
ENDIF() ENDIF()
# Find Python # Find Python
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment