diff options
-rw-r--r-- | lldb/CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt index 8f20d8c1d52..39164a10659 100644 --- a/lldb/CMakeLists.txt +++ b/lldb/CMakeLists.txt @@ -71,6 +71,16 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) include(AddLLVM) include(HandleLLVMOptions) + # Verify that we can find a Python 2 interpreter. Python 3 is unsupported. + set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5) + 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() + # Import CMake library targets from LLVM and Clang. include("${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake/LLVMConfig.cmake") include("${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake") |