diff --git a/CMakeLists.txt b/CMakeLists.txt index cc816bf4b2..d783a22003 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,14 +107,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) if(LLVM_INCLUDE_TESTS) - 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 Python3_EXECUTABLE CMake variable.") - endif() + find_package(Python3 3.8 REQUIRED COMPONENTS Interpreter) # Check prebuilt llvm/utils. if(EXISTS ${LLVM_TOOLS_BINARY_DIR}/FileCheck${CMAKE_EXECUTABLE_SUFFIX}