This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG39970764af39: [CMake] Require python 3.6 if enabling LLVM test targets (authored by ctetreau).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95635/new/ https://reviews.llvm.org/D95635 Files: clang/CMakeLists.txt lld/CMakeLists.txt llvm/CMakeLists.txt llvm/cmake/modules/HandleLLVMOptions.cmake mlir/CMakeLists.txt Index: mlir/CMakeLists.txt =================================================================== --- mlir/CMakeLists.txt +++ mlir/CMakeLists.txt @@ -106,7 +106,8 @@ if(MLIR_BINDINGS_PYTHON_ENABLED) include(MLIRDetectPythonEnv) - find_package(Python3 COMPONENTS Interpreter Development NumPy REQUIRED) + find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} + COMPONENTS Interpreter Development NumPy REQUIRED) message(STATUS "Found python include dirs: ${Python3_INCLUDE_DIRS}") message(STATUS "Found python libraries: ${Python3_LIBRARIES}") message(STATUS "Found numpy v${Python3_NumPy_VERSION}: ${Python3_NumPy_INCLUDE_DIRS}") Index: llvm/cmake/modules/HandleLLVMOptions.cmake =================================================================== --- llvm/cmake/modules/HandleLLVMOptions.cmake +++ llvm/cmake/modules/HandleLLVMOptions.cmake @@ -1176,3 +1176,11 @@ append_if(SUPPORTS_FFILE_PREFIX_MAP "-ffile-prefix-map=${source_root}/=${LLVM_SOURCE_PREFIX}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) add_flag_if_supported("-no-canonical-prefixes" NO_CANONICAL_PREFIXES) endif() + +if(LLVM_INCLUDE_TESTS) + # Lit test suite requires at least python 3.6 + set(LLVM_MINIMUM_PYTHON_VERSION 3.6) +else() + # FIXME: it is unknown if this is the actual minimum bound + set(LLVM_MINIMUM_PYTHON_VERSION 3.0) +endif() Index: llvm/CMakeLists.txt =================================================================== --- llvm/CMakeLists.txt +++ llvm/CMakeLists.txt @@ -693,7 +693,8 @@ include(HandleLLVMOptions) -find_package(Python3 REQUIRED COMPONENTS Interpreter) +find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} REQUIRED + COMPONENTS Interpreter) ###### Index: lld/CMakeLists.txt =================================================================== --- lld/CMakeLists.txt +++ lld/CMakeLists.txt @@ -57,7 +57,8 @@ include(CheckAtomic) if(LLVM_INCLUDE_TESTS) - find_package(Python3 REQUIRED COMPONENTS Interpreter) + find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} REQUIRED + COMPONENTS Interpreter) # Check prebuilt llvm/utils. if(EXISTS ${LLVM_TOOLS_BINARY_DIR}/FileCheck${CMAKE_EXECUTABLE_SUFFIX} Index: clang/CMakeLists.txt =================================================================== --- clang/CMakeLists.txt +++ clang/CMakeLists.txt @@ -131,7 +131,8 @@ set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) if(LLVM_INCLUDE_TESTS) - find_package(Python3 REQUIRED COMPONENTS Interpreter) + find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} REQUIRED + COMPONENTS Interpreter) # Check prebuilt llvm/utils. if(EXISTS ${LLVM_TOOLS_BINARY_DIR}/FileCheck${CMAKE_EXECUTABLE_SUFFIX}
Index: mlir/CMakeLists.txt =================================================================== --- mlir/CMakeLists.txt +++ mlir/CMakeLists.txt @@ -106,7 +106,8 @@ if(MLIR_BINDINGS_PYTHON_ENABLED) include(MLIRDetectPythonEnv) - find_package(Python3 COMPONENTS Interpreter Development NumPy REQUIRED) + find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} + COMPONENTS Interpreter Development NumPy REQUIRED) message(STATUS "Found python include dirs: ${Python3_INCLUDE_DIRS}") message(STATUS "Found python libraries: ${Python3_LIBRARIES}") message(STATUS "Found numpy v${Python3_NumPy_VERSION}: ${Python3_NumPy_INCLUDE_DIRS}") Index: llvm/cmake/modules/HandleLLVMOptions.cmake =================================================================== --- llvm/cmake/modules/HandleLLVMOptions.cmake +++ llvm/cmake/modules/HandleLLVMOptions.cmake @@ -1176,3 +1176,11 @@ append_if(SUPPORTS_FFILE_PREFIX_MAP "-ffile-prefix-map=${source_root}/=${LLVM_SOURCE_PREFIX}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) add_flag_if_supported("-no-canonical-prefixes" NO_CANONICAL_PREFIXES) endif() + +if(LLVM_INCLUDE_TESTS) + # Lit test suite requires at least python 3.6 + set(LLVM_MINIMUM_PYTHON_VERSION 3.6) +else() + # FIXME: it is unknown if this is the actual minimum bound + set(LLVM_MINIMUM_PYTHON_VERSION 3.0) +endif() Index: llvm/CMakeLists.txt =================================================================== --- llvm/CMakeLists.txt +++ llvm/CMakeLists.txt @@ -693,7 +693,8 @@ include(HandleLLVMOptions) -find_package(Python3 REQUIRED COMPONENTS Interpreter) +find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} REQUIRED + COMPONENTS Interpreter) ###### Index: lld/CMakeLists.txt =================================================================== --- lld/CMakeLists.txt +++ lld/CMakeLists.txt @@ -57,7 +57,8 @@ include(CheckAtomic) if(LLVM_INCLUDE_TESTS) - find_package(Python3 REQUIRED COMPONENTS Interpreter) + find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} REQUIRED + COMPONENTS Interpreter) # Check prebuilt llvm/utils. if(EXISTS ${LLVM_TOOLS_BINARY_DIR}/FileCheck${CMAKE_EXECUTABLE_SUFFIX} Index: clang/CMakeLists.txt =================================================================== --- clang/CMakeLists.txt +++ clang/CMakeLists.txt @@ -131,7 +131,8 @@ set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) if(LLVM_INCLUDE_TESTS) - find_package(Python3 REQUIRED COMPONENTS Interpreter) + find_package(Python3 ${LLVM_MINIMUM_PYTHON_VERSION} REQUIRED + COMPONENTS Interpreter) # Check prebuilt llvm/utils. if(EXISTS ${LLVM_TOOLS_BINARY_DIR}/FileCheck${CMAKE_EXECUTABLE_SUFFIX}
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits