[CMake] Warn when the version of CMake is older than 3.31.0 (#204203)
This is a preparation to raise the minimum required CMake version to 3.31.0 in LLVM 24. See https://discourse.llvm.org/t/rfc-raising-minimum-required-cmake-version-to-3-31/91086.
This commit is contained in:
parent
c4bb83ea5b
commit
e192ec42b4
20 changed files with 154 additions and 0 deletions
|
|
@ -1,4 +1,11 @@
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LLVM_SUBPROJECT_TITLE "BOLT")
|
set(LLVM_SUBPROJECT_TITLE "BOLT")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LLVM_SUBPROJECT_TITLE "Clang")
|
set(LLVM_SUBPROJECT_TITLE "Clang")
|
||||||
|
|
||||||
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
|
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,14 @@
|
||||||
# based on the ability of the host toolchain to target various platforms.
|
# based on the ability of the host toolchain to target various platforms.
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LLVM_SUBPROJECT_TITLE "Compiler-RT")
|
set(LLVM_SUBPROJECT_TITLE "Compiler-RT")
|
||||||
|
|
||||||
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
|
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LLVM_SUBPROJECT_TITLE "Flang")
|
set(LLVM_SUBPROJECT_TITLE "Flang")
|
||||||
|
|
||||||
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
|
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LLVM_SUBPROJECT_TITLE "libc")
|
set(LLVM_SUBPROJECT_TITLE "libc")
|
||||||
|
|
||||||
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,11 @@
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
|
||||||
project(libclc VERSION 0.2.0 LANGUAGES CXX C)
|
project(libclc VERSION 0.2.0 LANGUAGES CXX C)
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,14 @@
|
||||||
# Setup Project
|
# Setup Project
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LLVM_SUBPROJECT_TITLE "libc++")
|
set(LLVM_SUBPROJECT_TITLE "libc++")
|
||||||
|
|
||||||
# Unset the C++ Standard: other projects sometimes override this global property, which
|
# Unset the C++ Standard: other projects sometimes override this global property, which
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,14 @@
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LLVM_SUBPROJECT_TITLE "libc++abi")
|
set(LLVM_SUBPROJECT_TITLE "libc++abi")
|
||||||
|
|
||||||
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
|
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,13 @@
|
||||||
# Setup Project
|
# Setup Project
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LLVM_SUBPROJECT_TITLE "libsycl")
|
set(LLVM_SUBPROJECT_TITLE "libsycl")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,14 @@
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LLVM_SUBPROJECT_TITLE "libunwind")
|
set(LLVM_SUBPROJECT_TITLE "libunwind")
|
||||||
|
|
||||||
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
|
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LLVM_SUBPROJECT_TITLE "LLD")
|
set(LLVM_SUBPROJECT_TITLE "LLD")
|
||||||
|
|
||||||
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
|
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LLVM_SUBPROJECT_TITLE "LLDB")
|
set(LLVM_SUBPROJECT_TITLE "LLDB")
|
||||||
|
|
||||||
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
|
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,14 @@
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LLVM_SUBPROJECT_TITLE "LLVM libgcc")
|
set(LLVM_SUBPROJECT_TITLE "LLVM libgcc")
|
||||||
|
|
||||||
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
|
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,12 @@
|
||||||
# See docs/CMake.html for instructions about how to build LLVM with CMake.
|
# See docs/CMake.html for instructions about how to build LLVM with CMake.
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
include(CMakeDependentOption)
|
include(CMakeDependentOption)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,13 @@
|
||||||
# MLIR project.
|
# MLIR project.
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LLVM_SUBPROJECT_TITLE "MLIR")
|
set(LLVM_SUBPROJECT_TITLE "MLIR")
|
||||||
|
|
||||||
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
|
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,14 @@
|
||||||
# to build offload with CMake.
|
# to build offload with CMake.
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LLVM_SUBPROJECT_TITLE "liboffload")
|
set(LLVM_SUBPROJECT_TITLE "liboffload")
|
||||||
|
|
||||||
# The minimum versions required for dependencies.
|
# The minimum versions required for dependencies.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,12 @@
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LLVM_SUBPROJECT_TITLE "OpenMP")
|
set(LLVM_SUBPROJECT_TITLE "OpenMP")
|
||||||
|
|
||||||
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
|
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,13 @@
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
|
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
|
||||||
include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
|
include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,14 @@
|
||||||
if (NOT DEFINED LLVM_MAIN_SRC_DIR)
|
if (NOT DEFINED LLVM_MAIN_SRC_DIR)
|
||||||
project(Polly)
|
project(Polly)
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(POLLY_STANDALONE_BUILD TRUE)
|
set(POLLY_STANDALONE_BUILD TRUE)
|
||||||
endif()
|
endif()
|
||||||
set(LLVM_SUBPROJECT_TITLE "Polly")
|
set(LLVM_SUBPROJECT_TITLE "Polly")
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,12 @@
|
||||||
# This file handles building LLVM runtime sub-projects.
|
# This file handles building LLVM runtime sub-projects.
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
if("${CMAKE_VERSION}" VERSION_LESS "3.31.0")
|
||||||
|
message(WARNING
|
||||||
|
"Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 24, the "
|
||||||
|
"minimum version of CMake required to build LLVM will become 3.31.0, and "
|
||||||
|
"using an older CMake will become an error. Please upgrade your CMake to "
|
||||||
|
"at least 3.31.0 now to avoid issues in the future.")
|
||||||
|
endif()
|
||||||
|
|
||||||
# This file can be used in two ways: the bootstrapping build calls it from
|
# This file can be used in two ways: the bootstrapping build calls it from
|
||||||
# llvm/runtimes/CMakeLists.txt where we reuse the build tree of the top-level
|
# llvm/runtimes/CMakeLists.txt where we reuse the build tree of the top-level
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue