diff options
| author | Nathan Lanza <nathan@lanza.io> | 2018-11-07 23:22:09 +0000 |
|---|---|---|
| committer | Nathan Lanza <nathan@lanza.io> | 2018-11-07 23:22:09 +0000 |
| commit | 9a9372fd0da782f15abd8e4733a6f3c7859f9143 (patch) | |
| tree | 4db31356953e57154d62e1b75f26a3a5a950ef19 | |
| parent | 0917d0c80c4333b6d2a7415dd70809a89905160a (diff) | |
| download | bcm5719-llvm-9a9372fd0da782f15abd8e4733a6f3c7859f9143.tar.gz bcm5719-llvm-9a9372fd0da782f15abd8e4733a6f3c7859f9143.zip | |
Reorder FindPythonInterp so that config-ix can use PYTHON_EXECUTABLE
Summary:
Code in config-ix tries to call `PYTHON_EXECUTABLE` to search for some
python modules but that variable isn't set until the moved chunk of
code that finds Python is called.
Reorder it so CMake can use PYTHON_EXECUTABLE
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D52763
llvm-svn: 346367
| -rw-r--r-- | llvm/CMakeLists.txt | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 6d767208edb..4591ce56b1f 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -572,6 +572,22 @@ mark_as_advanced(LLVM_TARGET_TRIPLE_ENV) set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF CACHE BOOL "Enable per-target runtimes directory") +# Verify that we can find a Python 2 interpreter. Python 3 is unsupported. +# FIXME: We should support systems with only Python 3, but that requires work +# on LLDB. +set(Python_ADDITIONAL_VERSIONS 2.7) +include(FindPythonInterp) +if( NOT PYTHONINTERP_FOUND ) + message(FATAL_ERROR +"Unable to find Python interpreter, required for builds and testing. + +Please install Python or specify the PYTHON_EXECUTABLE CMake variable.") +endif() + +if( ${PYTHON_VERSION_STRING} VERSION_LESS 2.7 ) + message(FATAL_ERROR "Python 2.7 or newer is required") +endif() + # All options referred to from HandleLLVMOptions have to be specified # BEFORE this include, otherwise options will not be correctly set on # first cmake run @@ -591,22 +607,6 @@ message(STATUS "LLVM default target triple: ${LLVM_DEFAULT_TARGET_TRIPLE}") include(HandleLLVMOptions) -# Verify that we can find a Python 2 interpreter. Python 3 is unsupported. -# FIXME: We should support systems with only Python 3, but that requires work -# on LLDB. -set(Python_ADDITIONAL_VERSIONS 2.7) -include(FindPythonInterp) -if( NOT PYTHONINTERP_FOUND ) - message(FATAL_ERROR -"Unable to find Python interpreter, required for builds and testing. - -Please install Python or specify the PYTHON_EXECUTABLE CMake variable.") -endif() - -if( ${PYTHON_VERSION_STRING} VERSION_LESS 2.7 ) - message(FATAL_ERROR "Python 2.7 or newer is required") -endif() - ###### # LLVMBuild Integration # |

