summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-11-04 23:04:05 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-11-04 23:04:05 +0000
commita54c8ea8cfcba3682afb53301b93ecc59fc9897a (patch)
tree28bacd233ebb9fb5ccba90b816aedc8a01cbe577 /CMakeLists.txt
parent44e895761f289029657a8d066f67f0c9d18693b3 (diff)
build/cmake: Change to require Python be available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143742 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d29c784e1c..616330f571 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -205,6 +205,15 @@ option(LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON)
include(config-ix)
include(HandleLLVMOptions)
+# Verify that we can find a Python interpreter,
+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()
+
# Configure all of the various header file fragments LLVM uses which depend on
# configuration variables.
set(LLVM_ENUM_ASM_PRINTERS "")