From: Chandler Carruth Date: Mon, 29 Dec 2014 19:36:05 +0000 (+0000) Subject: [py3] Teach the CMake build to reject Python versions older than 2.7. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a318a2faaf29e95c25a1f441f27dd39fc18b5712;p=oota-llvm.git [py3] Teach the CMake build to reject Python versions older than 2.7. Continue to require Python 2 however as recent experiments suggest LLDB's build requires it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224948 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index ab626431e09..475352de796 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -344,7 +344,9 @@ set(TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}") 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) +# 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 @@ -353,6 +355,10 @@ if( NOT PYTHONINTERP_FOUND ) 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 #