1 --- llvm-11.0.0.src/CMakeLists.txt.orig 2020-10-07 12:10:48.000000000 +0200
2 +++ llvm-11.0.0.src/CMakeLists.txt 2020-10-13 01:18:33.807817497 +0200
4 set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF CACHE BOOL
5 "Enable per-target runtimes directory")
7 +include(FindPythonInterp)
8 +if( NOT PYTHONINTERP_FOUND )
10 +"Unable to find Python interpreter, required for builds and testing.
12 +Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
15 +if( ${PYTHON_VERSION_STRING} VERSION_LESS 2.7 )
16 + message(FATAL_ERROR "Python 2.7 or newer is required")
19 +add_executable(Python3::Interpreter IMPORTED)
20 +set_target_properties(Python3::Interpreter PROPERTIES
21 + IMPORTED_LOCATION ${PYTHON_EXECUTABLE})
22 +set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE})
24 set(LLVM_PROFDATA_FILE "" CACHE FILEPATH
25 "Profiling data file to use when compiling in order to improve runtime performance.")
29 include(HandleLLVMOptions)
31 -if(CMAKE_VERSION VERSION_LESS 3.12)
32 - include(FindPythonInterp)
33 - if( NOT PYTHONINTERP_FOUND )
35 - "Unable to find Python interpreter, required for builds and testing.
37 - Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
40 - if( ${PYTHON_VERSION_STRING} VERSION_LESS 2.7 )
41 - message(FATAL_ERROR "Python 2.7 or newer is required")
44 - add_executable(Python3::Interpreter IMPORTED)
45 - set_target_properties(Python3::Interpreter PROPERTIES
46 - IMPORTED_LOCATION ${PYTHON_EXECUTABLE})
47 - set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE})
49 - find_package(Python3 COMPONENTS Interpreter)
50 - if(NOT Python3_Interpreter_FOUND)
51 - message(WARNING "Python3 not found, using python2 as a fallback")
52 - find_package(Python2 COMPONENTS Interpreter REQUIRED)
53 - if(Python2_VERSION VERSION_LESS 2.7)
54 - message(SEND_ERROR "Python 2.7 or newer is required")
57 - # Treat python2 as python3
58 - add_executable(Python3::Interpreter IMPORTED)
59 - set_target_properties(Python3::Interpreter PROPERTIES
60 - IMPORTED_LOCATION ${Python2_EXECUTABLE})
61 - set(Python3_EXECUTABLE ${Python2_EXECUTABLE})
66 # LLVMBuild Integration