Recommend the -flto flag instead of -use-gold-plugin, and update
[oota-llvm.git] / CMakeLists.txt
index d29c784e1c2b1aee1eaf53f1b0cde4a51cdc7d03..616330f5717a8f01cf28e916f1d9eb0a165d5540 100644 (file)
@@ -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 "")