Mordante created this revision. Mordante added reviewers: bollu, tstellar, mehdi_amini, MaskRay, ChuanqiXu, to268, kparzysz, thieta, tschuett, mgorny, stellaraccident, mizvekov, ldionne, jdoerfert, phosek. Herald added subscribers: libc-commits, libcxx-commits, Moerafaat, zero9178, Enna1, bzcheeseman, ayermolo, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, jvesely, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, antiagainst, shauheen, rriddle, thopre, whisperity. Herald added a reviewer: rafauler. Herald added a reviewer: Amir. Herald added a reviewer: maksfb. Herald added a reviewer: NoQ. Herald added projects: libunwind, libc-project, Flang, All. Herald added a reviewer: libunwind. Mordante added reviewers: libc++ vendors, clang-vendors. Mordante published this revision for review. Herald added subscribers: llvm-commits, openmp-commits, lldb-commits, Sanitizers, cfe-commits, yota9, stephenneuendorffer, nicolasvasilache. Herald added projects: clang, Sanitizers, LLDB, libc++, OpenMP, libc++abi, MLIR, LLVM. Herald added a reviewer: libc++. Herald added a reviewer: libc++abi.
This partly undoes D137724 <https://reviews.llvm.org/D137724>. This change has been discussed on discourse https://discourse.llvm.org/t/rfc-upgrading-llvms-minimum-required-cmake-version/66193 Note this does not remove work-arounds for older CMake versions, that will be done in followup patches. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D144509 Files: bolt/runtime/CMakeLists.txt clang/CMakeLists.txt clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt compiler-rt/CMakeLists.txt compiler-rt/lib/builtins/CMakeLists.txt compiler-rt/lib/crt/CMakeLists.txt flang/CMakeLists.txt flang/lib/Decimal/CMakeLists.txt flang/runtime/CMakeLists.txt libc/CMakeLists.txt libc/examples/hello_world/CMakeLists.txt libclc/CMakeLists.txt libcxx/CMakeLists.txt libcxxabi/CMakeLists.txt libunwind/CMakeLists.txt lld/CMakeLists.txt lldb/CMakeLists.txt lldb/tools/debugserver/CMakeLists.txt llvm-libgcc/CMakeLists.txt llvm/CMakeLists.txt llvm/docs/CMake.rst llvm/docs/GettingStarted.rst llvm/docs/ReleaseNotes.rst mlir/CMakeLists.txt mlir/examples/standalone/CMakeLists.txt openmp/CMakeLists.txt openmp/cmake/DetectTestCompiler/CMakeLists.txt openmp/docs/SupportAndFAQ.rst openmp/libompd/src/CMakeLists.txt openmp/libomptarget/plugins/remote/src/CMakeLists.txt openmp/runtime/cmake/LibompCheckLinkerFlag.cmake openmp/tools/Modules/FindOpenMPTarget.cmake openmp/tools/Modules/README.rst polly/CMakeLists.txt pstl/CMakeLists.txt runtimes/CMakeLists.txt
Index: runtimes/CMakeLists.txt =================================================================== --- runtimes/CMakeLists.txt +++ runtimes/CMakeLists.txt @@ -1,12 +1,5 @@ # This file handles building LLVM runtime sub-projects. -cmake_minimum_required(VERSION 3.13.4) -if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0") - message(WARNING - "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the " - "minimum version of CMake required to build LLVM will become 3.20.0, and " - "using an older CMake will become an error. Please upgrade your CMake to " - "at least 3.20.0 now to avoid issues in the future!") -endif() +cmake_minimum_required(VERSION 3.20.0) project(Runtimes C CXX ASM) # Add path for custom and the LLVM build's modules to the CMake module path. Index: pstl/CMakeLists.txt =================================================================== --- pstl/CMakeLists.txt +++ pstl/CMakeLists.txt @@ -5,7 +5,7 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===----------------------------------------------------------------------===## -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) set(PARALLELSTL_VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/include/pstl/internal/pstl_config.h") file(STRINGS "${PARALLELSTL_VERSION_FILE}" PARALLELSTL_VERSION_SOURCE REGEX "#define _PSTL_VERSION .*$") Index: polly/CMakeLists.txt =================================================================== --- polly/CMakeLists.txt +++ polly/CMakeLists.txt @@ -1,14 +1,7 @@ # Check if this is a in tree build. if (NOT DEFINED LLVM_MAIN_SRC_DIR) project(Polly) - cmake_minimum_required(VERSION 3.13.4) - if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0") - message(WARNING - "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the " - "minimum version of CMake required to build LLVM will become 3.20.0, and " - "using an older CMake will become an error. Please upgrade your CMake to " - "at least 3.20.0 now to avoid issues in the future!") - endif() + cmake_minimum_required(VERSION 3.20.0) set(POLLY_STANDALONE_BUILD TRUE) endif() Index: openmp/tools/Modules/README.rst =================================================================== --- openmp/tools/Modules/README.rst +++ openmp/tools/Modules/README.rst @@ -26,7 +26,7 @@ .. code-block:: cmake - cmake_minimum_required(VERSION 3.13.4) + cmake_minimum_required(VERSION 3.20.0) project(offloadTest VERSION 1.0 LANGUAGES CXX) list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp") @@ -37,7 +37,7 @@ target_link_libraries(offload PRIVATE OpenMPTarget::OpenMPTarget_NVPTX) target_sources(offload PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp) -Using this module requires at least CMake version 3.13.4. Supported languages +Using this module requires at least CMake version 3.20.0. Supported languages are C and C++ with Fortran support planned in the future. If your application requires building for a specific device architecture you can set the ``OpenMPTarget_<device>_ARCH=<flag>`` variable. Compiler support is best for Index: openmp/tools/Modules/FindOpenMPTarget.cmake =================================================================== --- openmp/tools/Modules/FindOpenMPTarget.cmake +++ openmp/tools/Modules/FindOpenMPTarget.cmake @@ -79,7 +79,7 @@ # TODO: Test more compilers cmake_policy(PUSH) -cmake_policy(VERSION 3.13.4) +cmake_policy(VERSION 3.20.0) find_package(OpenMP ${OpenMPTarget_FIND_VERSION} REQUIRED) Index: openmp/runtime/cmake/LibompCheckLinkerFlag.cmake =================================================================== --- openmp/runtime/cmake/LibompCheckLinkerFlag.cmake +++ openmp/runtime/cmake/LibompCheckLinkerFlag.cmake @@ -19,7 +19,7 @@ set(library_source "int foo(int a) { return a*a; }") set(cmake_source - "cmake_minimum_required(VERSION 3.13.4) + "cmake_minimum_required(VERSION 3.20.0) project(foo C) set(CMAKE_SHARED_LINKER_FLAGS \"${flag}\") add_library(foo SHARED src_to_link.c)") Index: openmp/libomptarget/plugins/remote/src/CMakeLists.txt =================================================================== --- openmp/libomptarget/plugins/remote/src/CMakeLists.txt +++ openmp/libomptarget/plugins/remote/src/CMakeLists.txt @@ -10,7 +10,7 @@ # ##===----------------------------------------------------------------------===## -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) # Define the suffix for the runtime messaging dumps. add_definitions(-DTARGET_NAME=RPC) Index: openmp/libompd/src/CMakeLists.txt =================================================================== --- openmp/libompd/src/CMakeLists.txt +++ openmp/libompd/src/CMakeLists.txt @@ -9,7 +9,7 @@ # project (libompd) -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) add_library (ompd SHARED TargetValue.cpp omp-debug.cpp omp-state.cpp omp-icv.cpp) Index: openmp/docs/SupportAndFAQ.rst =================================================================== --- openmp/docs/SupportAndFAQ.rst +++ openmp/docs/SupportAndFAQ.rst @@ -300,7 +300,7 @@ .. code-block:: cmake - cmake_minimum_required(VERSION 3.13.4) + cmake_minimum_required(VERSION 3.20.0) project(offloadTest VERSION 1.0 LANGUAGES CXX) list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp") @@ -311,7 +311,7 @@ target_link_libraries(offload PRIVATE OpenMPTarget::OpenMPTarget_NVPTX) target_sources(offload PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp) -Using this module requires at least CMake version 3.13.4. Supported languages +Using this module requires at least CMake version 3.20.0. Supported languages are C and C++ with Fortran support planned in the future. Compiler support is best for Clang but this module should work for other compiler vendors such as IBM, GNU. Index: openmp/cmake/DetectTestCompiler/CMakeLists.txt =================================================================== --- openmp/cmake/DetectTestCompiler/CMakeLists.txt +++ openmp/cmake/DetectTestCompiler/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) project(DetectTestCompiler C CXX) include(CheckCCompilerFlag) Index: openmp/CMakeLists.txt =================================================================== --- openmp/CMakeLists.txt +++ openmp/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) @@ -12,13 +12,6 @@ if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") set(OPENMP_STANDALONE_BUILD TRUE) project(openmp C CXX) - if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0") - message(WARNING - "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the " - "minimum version of CMake required to build LLVM will become 3.20.0, and " - "using an older CMake will become an error. Please upgrade your CMake to " - "at least 3.20.0 now to avoid issues in the future!") - endif() endif() # Must go below project(..) Index: mlir/examples/standalone/CMakeLists.txt =================================================================== --- mlir/examples/standalone/CMakeLists.txt +++ mlir/examples/standalone/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) project(standalone-dialect LANGUAGES CXX C) set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON) Index: mlir/CMakeLists.txt =================================================================== --- mlir/CMakeLists.txt +++ mlir/CMakeLists.txt @@ -1,5 +1,5 @@ # MLIR project. -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS) set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) @@ -11,13 +11,6 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) project(mlir) set(MLIR_STANDALONE_BUILD TRUE) - if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0") - message(WARNING - "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the " - "minimum version of CMake required to build LLVM will become 3.20.0, and " - "using an older CMake will become an error. Please upgrade your CMake to " - "at least 3.20.0 now to avoid issues in the future!") - endif() endif() # Must go below project(..) Index: llvm/docs/ReleaseNotes.rst =================================================================== --- llvm/docs/ReleaseNotes.rst +++ llvm/docs/ReleaseNotes.rst @@ -47,6 +47,11 @@ Update on required toolchains to build LLVM ------------------------------------------- +With LLVM 17.x we raised the version requirement of CMake used to build LLVM. +The new requirements are as follows: + +* CMake >= 3.20.0 + Changes to the LLVM IR ---------------------- Index: llvm/docs/GettingStarted.rst =================================================================== --- llvm/docs/GettingStarted.rst +++ llvm/docs/GettingStarted.rst @@ -263,7 +263,7 @@ =========================================================== ============ ========================================== Package Version Notes =========================================================== ============ ========================================== -`CMake <http://cmake.org/>`__ >=3.13.4 Makefile/workspace generator +`CMake <http://cmake.org/>`__ >=3.20.0 Makefile/workspace generator `GCC <http://gcc.gnu.org/>`_ >=7.1.0 C/C++ compiler\ :sup:`1` `python <http://www.python.org/>`_ >=3.6 Automated test suite\ :sup:`2` `zlib <http://zlib.net>`_ >=1.2.3.4 Compression library\ :sup:`3` Index: llvm/docs/CMake.rst =================================================================== --- llvm/docs/CMake.rst +++ llvm/docs/CMake.rst @@ -34,7 +34,7 @@ We use here the command-line, non-interactive CMake interface. #. `Download <http://www.cmake.org/cmake/resources/software.html>`_ and install - CMake. Version 3.13.4 is the minimum required. + CMake. Version 3.20.0 is the minimum required. #. Open a shell. Your development tools must be reachable from this shell through the PATH environment variable. @@ -914,7 +914,7 @@ .. code-block:: cmake - cmake_minimum_required(VERSION 3.13.4) + cmake_minimum_required(VERSION 3.20.0) project(SimpleProject) find_package(LLVM REQUIRED CONFIG) Index: llvm/CMakeLists.txt =================================================================== --- llvm/CMakeLists.txt +++ llvm/CMakeLists.txt @@ -1,13 +1,6 @@ # See docs/CMake.html for instructions about how to build LLVM with CMake. -cmake_minimum_required(VERSION 3.13.4) -if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0") - message(WARNING - "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the " - "minimum version of CMake required to build LLVM will become 3.20.0, and " - "using an older CMake will become an error. Please upgrade your CMake to " - "at least 3.20.0 now to avoid issues in the future!") -endif() +cmake_minimum_required(VERSION 3.20.0) set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake Index: llvm-libgcc/CMakeLists.txt =================================================================== --- llvm-libgcc/CMakeLists.txt +++ llvm-libgcc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) if (NOT IS_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/../libunwind") message(FATAL_ERROR "llvm-libgcc requires being built in a monorepo layout with libunwind available") Index: lldb/tools/debugserver/CMakeLists.txt =================================================================== --- lldb/tools/debugserver/CMakeLists.txt +++ lldb/tools/debugserver/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) project(Debugserver LANGUAGES C CXX ASM-ATT) @@ -7,13 +7,6 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) set(LLDB_BUILT_STANDALONE TRUE) - if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0") - message(WARNING - "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the " - "minimum version of CMake required to build LLVM will become 3.20.0, and " - "using an older CMake will become an error. Please upgrade your CMake to " - "at least 3.20.0 now to avoid issues in the future!") - endif() set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} Index: lldb/CMakeLists.txt =================================================================== --- lldb/CMakeLists.txt +++ lldb/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS) set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) @@ -19,13 +19,6 @@ project(lldb) set(LLDB_BUILT_STANDALONE TRUE) set(LLVM_INCLUDE_TESTS ON CACHE INTERNAL "") - if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0") - message(WARNING - "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the " - "minimum version of CMake required to build LLVM will become 3.20.0, and " - "using an older CMake will become an error. Please upgrade your CMake to " - "at least 3.20.0 now to avoid issues in the future!") - endif() endif() # Must go below project(..) Index: lld/CMakeLists.txt =================================================================== --- lld/CMakeLists.txt +++ lld/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS) set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) @@ -11,13 +11,6 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) project(lld) set(LLD_BUILT_STANDALONE TRUE) - if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0") - message(WARNING - "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the " - "minimum version of CMake required to build LLVM will become 3.20.0, and " - "using an older CMake will become an error. Please upgrade your CMake to " - "at least 3.20.0 now to avoid issues in the future!") - endif() endif() # Must go below project(..) Index: libunwind/CMakeLists.txt =================================================================== --- libunwind/CMakeLists.txt +++ libunwind/CMakeLists.txt @@ -2,7 +2,7 @@ # Setup Project #=============================================================================== -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") Index: libcxxabi/CMakeLists.txt =================================================================== --- libcxxabi/CMakeLists.txt +++ libcxxabi/CMakeLists.txt @@ -4,7 +4,7 @@ # Setup Project #=============================================================================== -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") Index: libcxx/CMakeLists.txt =================================================================== --- libcxx/CMakeLists.txt +++ libcxx/CMakeLists.txt @@ -4,7 +4,7 @@ #=============================================================================== # Setup Project #=============================================================================== -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") Index: libclc/CMakeLists.txt =================================================================== --- libclc/CMakeLists.txt +++ libclc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) project( libclc VERSION 0.2.0 LANGUAGES CXX C) Index: libc/examples/hello_world/CMakeLists.txt =================================================================== --- libc/examples/hello_world/CMakeLists.txt +++ libc/examples/hello_world/CMakeLists.txt @@ -1,5 +1,5 @@ project(hello_world) -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) include(../examples.cmake) add_example( Index: libc/CMakeLists.txt =================================================================== --- libc/CMakeLists.txt +++ libc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) # Default to C++17 set(CMAKE_CXX_STANDARD 17) Index: flang/runtime/CMakeLists.txt =================================================================== --- flang/runtime/CMakeLists.txt +++ flang/runtime/CMakeLists.txt @@ -7,14 +7,7 @@ #===------------------------------------------------------------------------===# if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) - cmake_minimum_required(VERSION 3.13.4) - if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0") - message(WARNING - "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the " - "minimum version of CMake required to build LLVM will become 3.20.0, and " - "using an older CMake will become an error. Please upgrade your CMake to " - "at least 3.20.0 now to avoid issues in the future!") - endif() + cmake_minimum_required(VERSION 3.20.0) project(FlangRuntime C CXX) Index: flang/lib/Decimal/CMakeLists.txt =================================================================== --- flang/lib/Decimal/CMakeLists.txt +++ flang/lib/Decimal/CMakeLists.txt @@ -1,5 +1,5 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) - cmake_minimum_required(VERSION 3.13.4) + cmake_minimum_required(VERSION 3.20.0) project(FortranDecimal C CXX) Index: flang/CMakeLists.txt =================================================================== --- flang/CMakeLists.txt +++ flang/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS) set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) @@ -31,13 +31,6 @@ message("Building Flang as a standalone project.") project(Flang) set(FLANG_STANDALONE_BUILD ON) - if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0") - message(WARNING - "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the " - "minimum version of CMake required to build LLVM will become 3.20.0, and " - "using an older CMake will become an error. Please upgrade your CMake to " - "at least 3.20.0 now to avoid issues in the future!") - endif() else() set(FLANG_STANDALONE_BUILD OFF) endif() Index: compiler-rt/lib/crt/CMakeLists.txt =================================================================== --- compiler-rt/lib/crt/CMakeLists.txt +++ compiler-rt/lib/crt/CMakeLists.txt @@ -1,12 +1,5 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) - cmake_minimum_required(VERSION 3.13.4) - if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0") - message(WARNING - "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the " - "minimum version of CMake required to build LLVM will become 3.20.0, and " - "using an older CMake will become an error. Please upgrade your CMake to " - "at least 3.20.0 now to avoid issues in the future!") - endif() + cmake_minimum_required(VERSION 3.20.0) set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) project(CompilerRTCRT C) Index: compiler-rt/lib/builtins/CMakeLists.txt =================================================================== --- compiler-rt/lib/builtins/CMakeLists.txt +++ compiler-rt/lib/builtins/CMakeLists.txt @@ -3,14 +3,7 @@ # architecture-specific code in various subdirectories. if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) - cmake_minimum_required(VERSION 3.13.4) - if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0") - message(WARNING - "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the " - "minimum version of CMake required to build LLVM will become 3.20.0, and " - "using an older CMake will become an error. Please upgrade your CMake to " - "at least 3.20.0 now to avoid issues in the future!") - endif() + cmake_minimum_required(VERSION 3.20.0) set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) project(CompilerRTBuiltins C ASM) Index: compiler-rt/CMakeLists.txt =================================================================== --- compiler-rt/CMakeLists.txt +++ compiler-rt/CMakeLists.txt @@ -3,20 +3,13 @@ # An important constraint of the build is that it only produces libraries # based on the ability of the host toolchain to target various platforms. -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) # Check if compiler-rt is built as a standalone project. if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD) project(CompilerRT C CXX ASM) set(COMPILER_RT_STANDALONE_BUILD TRUE) set_property(GLOBAL PROPERTY USE_FOLDERS ON) - if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0") - message(WARNING - "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the " - "minimum version of CMake required to build LLVM will become 3.20.0, and " - "using an older CMake will become an error. Please upgrade your CMake to " - "at least 3.20.0 now to avoid issues in the future!") - endif() endif() set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") Index: clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt =================================================================== --- clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt +++ clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt @@ -1,6 +1,6 @@ project(exec C) -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) include(CheckCCompilerFlag) check_c_compiler_flag("-std=c99" C99_SUPPORTED) Index: clang/CMakeLists.txt =================================================================== --- clang/CMakeLists.txt +++ clang/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS) set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) @@ -11,13 +11,6 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) project(Clang) set(CLANG_BUILT_STANDALONE TRUE) - if ("${CMAKE_VERSION}" VERSION_LESS "3.20.0") - message(WARNING - "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 17.0.0, the " - "minimum version of CMake required to build LLVM will become 3.20.0, and " - "using an older CMake will become an error. Please upgrade your CMake to " - "at least 3.20.0 now to avoid issues in the future!") - endif() endif() # Must go below project(..) Index: bolt/runtime/CMakeLists.txt =================================================================== --- bolt/runtime/CMakeLists.txt +++ bolt/runtime/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.13.4) +cmake_minimum_required(VERSION 3.20.0) include(CheckIncludeFiles) include(GNUInstallDirs)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits