summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark de Wever <koraq@xs4all.nl>2023-03-18 20:32:43 +0100
committerMark de Wever <koraq@xs4all.nl>2023-03-18 20:32:43 +0100
commitd0398d3593ba030db83b888370f8f0f3025c296e (patch)
treeff3775caf270d9f3f62e9f166e2a1ed9031ba790
parentf03cd763384bbb67ddfa12957859ed58841d4b34 (diff)
downloadllvm-d0398d3593ba030db83b888370f8f0f3025c296e.tar.gz
Revert "Reland "[CMake] Bumps minimum version to 3.20.0.""
This reverts commit a72165e5df59032cdd54dcb18155f2630d73abd1. Some buildbots have not been updated yet.
-rw-r--r--bolt/runtime/CMakeLists.txt2
-rw-r--r--clang/CMakeLists.txt9
-rw-r--r--clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt2
-rw-r--r--compiler-rt/CMakeLists.txt9
-rw-r--r--compiler-rt/lib/builtins/CMakeLists.txt9
-rw-r--r--compiler-rt/lib/crt/CMakeLists.txt9
-rw-r--r--flang/CMakeLists.txt9
-rw-r--r--flang/lib/Decimal/CMakeLists.txt2
-rw-r--r--flang/runtime/CMakeLists.txt9
-rw-r--r--libc/CMakeLists.txt2
-rw-r--r--libc/examples/hello_world/CMakeLists.txt2
-rw-r--r--libclc/CMakeLists.txt2
-rw-r--r--libcxx/CMakeLists.txt2
-rw-r--r--libcxxabi/CMakeLists.txt2
-rw-r--r--libunwind/CMakeLists.txt2
-rw-r--r--libunwind/src/CMakeLists.txt3
-rw-r--r--lld/CMakeLists.txt9
-rw-r--r--lldb/CMakeLists.txt9
-rw-r--r--lldb/tools/debugserver/CMakeLists.txt9
-rw-r--r--llvm-libgcc/CMakeLists.txt2
-rw-r--r--llvm/CMakeLists.txt9
-rw-r--r--llvm/docs/CMake.rst4
-rw-r--r--llvm/docs/GettingStarted.rst2
-rw-r--r--llvm/docs/ReleaseNotes.rst5
-rw-r--r--mlir/CMakeLists.txt9
-rw-r--r--mlir/examples/standalone/CMakeLists.txt2
-rw-r--r--openmp/CMakeLists.txt9
-rw-r--r--openmp/cmake/DetectTestCompiler/CMakeLists.txt2
-rw-r--r--openmp/docs/SupportAndFAQ.rst4
-rw-r--r--openmp/libompd/src/CMakeLists.txt2
-rw-r--r--openmp/libomptarget/plugins/remote/src/CMakeLists.txt2
-rw-r--r--openmp/runtime/cmake/LibompCheckLinkerFlag.cmake2
-rw-r--r--openmp/tools/Modules/FindOpenMPTarget.cmake2
-rw-r--r--openmp/tools/Modules/README.rst4
-rw-r--r--polly/CMakeLists.txt9
-rw-r--r--pstl/CMakeLists.txt2
-rw-r--r--runtimes/CMakeLists.txt9
37 files changed, 138 insertions, 44 deletions
diff --git a/bolt/runtime/CMakeLists.txt b/bolt/runtime/CMakeLists.txt
index 37a894702206..7d177f7c598b 100644
--- a/bolt/runtime/CMakeLists.txt
+++ b/bolt/runtime/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
include(CheckIncludeFiles)
include(GNUInstallDirs)
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 33a003c0feb9..1fff005d6525 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
@@ -11,6 +11,13 @@ include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
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(..)
diff --git a/clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt b/clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt
index 95c6fdb610e0..007ad4530d6d 100644
--- a/clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt
+++ b/clang/tools/scan-build-py/tests/functional/exec/CMakeLists.txt
@@ -1,6 +1,6 @@
project(exec C)
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
include(CheckCCompilerFlag)
check_c_compiler_flag("-std=c99" C99_SUPPORTED)
diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
index ffd3a7e32438..8a13508fcb98 100644
--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/CMakeLists.txt
@@ -3,13 +3,20 @@
# 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.20.0)
+cmake_minimum_required(VERSION 3.13.4)
# 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")
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index ac6f00f75c47..0487126a8a54 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -3,7 +3,14 @@
# architecture-specific code in various subdirectories.
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
- cmake_minimum_required(VERSION 3.20.0)
+ 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()
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(CompilerRTBuiltins C ASM)
diff --git a/compiler-rt/lib/crt/CMakeLists.txt b/compiler-rt/lib/crt/CMakeLists.txt
index 32fd61b1fa11..771652f438f8 100644
--- a/compiler-rt/lib/crt/CMakeLists.txt
+++ b/compiler-rt/lib/crt/CMakeLists.txt
@@ -1,5 +1,12 @@
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
- cmake_minimum_required(VERSION 3.20.0)
+ 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()
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(CompilerRTCRT C)
diff --git a/flang/CMakeLists.txt b/flang/CMakeLists.txt
index be453b40fc98..9be6cd7eb1f5 100644
--- a/flang/CMakeLists.txt
+++ b/flang/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
@@ -31,6 +31,13 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
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()
diff --git a/flang/lib/Decimal/CMakeLists.txt b/flang/lib/Decimal/CMakeLists.txt
index 0a625923de88..5c5a498f1a3c 100644
--- a/flang/lib/Decimal/CMakeLists.txt
+++ b/flang/lib/Decimal/CMakeLists.txt
@@ -1,5 +1,5 @@
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
- cmake_minimum_required(VERSION 3.20.0)
+ cmake_minimum_required(VERSION 3.13.4)
project(FortranDecimal C CXX)
diff --git a/flang/runtime/CMakeLists.txt b/flang/runtime/CMakeLists.txt
index 68a0ae326ead..15da5a20aaec 100644
--- a/flang/runtime/CMakeLists.txt
+++ b/flang/runtime/CMakeLists.txt
@@ -7,7 +7,14 @@
#===------------------------------------------------------------------------===#
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
- cmake_minimum_required(VERSION 3.20.0)
+ 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()
project(FlangRuntime C CXX)
diff --git a/libc/CMakeLists.txt b/libc/CMakeLists.txt
index 908bf7938a3a..0a9627246d0f 100644
--- a/libc/CMakeLists.txt
+++ b/libc/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
# Include LLVM's cmake policies.
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
diff --git a/libc/examples/hello_world/CMakeLists.txt b/libc/examples/hello_world/CMakeLists.txt
index 1561cdc1c3bf..89bf35c0340d 100644
--- a/libc/examples/hello_world/CMakeLists.txt
+++ b/libc/examples/hello_world/CMakeLists.txt
@@ -1,5 +1,5 @@
project(hello_world)
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
include(../examples.cmake)
add_example(
diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index 1e273d45f50e..89f08b889ea1 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
project( libclc VERSION 0.2.0 LANGUAGES CXX C)
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 5d35f8daf10b..cf572af74bd1 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -4,7 +4,7 @@
#===============================================================================
# Setup Project
#===============================================================================
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
diff --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
index 285c01a8f705..9239274d7af1 100644
--- a/libcxxabi/CMakeLists.txt
+++ b/libcxxabi/CMakeLists.txt
@@ -4,7 +4,7 @@
# Setup Project
#===============================================================================
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt
index cd38d6539391..647b1c41955b 100644
--- a/libunwind/CMakeLists.txt
+++ b/libunwind/CMakeLists.txt
@@ -2,7 +2,7 @@
# Setup Project
#===============================================================================
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt
index 1a5f4e07b278..cced6b4cf9e8 100644
--- a/libunwind/src/CMakeLists.txt
+++ b/libunwind/src/CMakeLists.txt
@@ -35,7 +35,8 @@ set(LIBUNWIND_ASM_SOURCES
# CMake doesn't work correctly with assembly on AIX. Workaround by compiling
# as C files as well.
if((APPLE AND CMAKE_VERSION VERSION_LESS 3.19) OR
- (MINGW AND CMAKE_VERSION VERSION_LESS 3.17))
+ (MINGW AND CMAKE_VERSION VERSION_LESS 3.17) OR
+ (${CMAKE_SYSTEM_NAME} MATCHES "AIX"))
set_source_files_properties(${LIBUNWIND_ASM_SOURCES} PROPERTIES LANGUAGE C)
endif()
diff --git a/lld/CMakeLists.txt b/lld/CMakeLists.txt
index a24330d2f18e..1e9e47393196 100644
--- a/lld/CMakeLists.txt
+++ b/lld/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
@@ -11,6 +11,13 @@ include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
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(..)
diff --git a/lldb/CMakeLists.txt b/lldb/CMakeLists.txt
index 9ae6722295ac..20d584c48bad 100644
--- a/lldb/CMakeLists.txt
+++ b/lldb/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
@@ -19,6 +19,13 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
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(..)
diff --git a/lldb/tools/debugserver/CMakeLists.txt b/lldb/tools/debugserver/CMakeLists.txt
index 74afea804598..4940ea488682 100644
--- a/lldb/tools/debugserver/CMakeLists.txt
+++ b/lldb/tools/debugserver/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
project(Debugserver LANGUAGES C CXX ASM-ATT)
@@ -7,6 +7,13 @@ include(GNUInstallDirs)
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}
diff --git a/llvm-libgcc/CMakeLists.txt b/llvm-libgcc/CMakeLists.txt
index de42d908c371..91c40bbf1cf3 100644
--- a/llvm-libgcc/CMakeLists.txt
+++ b/llvm-libgcc/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
if (NOT IS_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/../libunwind")
message(FATAL_ERROR "llvm-libgcc requires being built in a monorepo layout with libunwind available")
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 50597a3518ff..bd23d6657829 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -1,6 +1,13 @@
# 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.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()
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
diff --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst
index 3fa593ec2a6b..8b17d4c4406a 100644
--- a/llvm/docs/CMake.rst
+++ b/llvm/docs/CMake.rst
@@ -34,7 +34,7 @@ Quick start
We use here the command-line, non-interactive CMake interface.
#. `Download <http://www.cmake.org/cmake/resources/software.html>`_ and install
- CMake. Version 3.20.0 is the minimum required.
+ CMake. Version 3.13.4 is the minimum required.
#. Open a shell. Your development tools must be reachable from this shell
through the PATH environment variable.
@@ -911,7 +911,7 @@ and uses them to build a simple application ``simple-tool``.
.. code-block:: cmake
- cmake_minimum_required(VERSION 3.20.0)
+ cmake_minimum_required(VERSION 3.13.4)
project(SimpleProject)
find_package(LLVM REQUIRED CONFIG)
diff --git a/llvm/docs/GettingStarted.rst b/llvm/docs/GettingStarted.rst
index f9b47a160cb7..9247b3908aeb 100644
--- a/llvm/docs/GettingStarted.rst
+++ b/llvm/docs/GettingStarted.rst
@@ -280,7 +280,7 @@ uses the package and provides other details.
=========================================================== ============ ==========================================
Package Version Notes
=========================================================== ============ ==========================================
-`CMake <http://cmake.org/>`__ >=3.20.0 Makefile/workspace generator
+`CMake <http://cmake.org/>`__ >=3.13.4 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`
diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst
index e83fdfe07ff9..c752b8dbf01c 100644
--- a/llvm/docs/ReleaseNotes.rst
+++ b/llvm/docs/ReleaseNotes.rst
@@ -47,11 +47,6 @@ Non-comprehensive list of changes in this release
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
----------------------
diff --git a/mlir/CMakeLists.txt b/mlir/CMakeLists.txt
index d91d1b105da4..c9b0d53bc3e9 100644
--- a/mlir/CMakeLists.txt
+++ b/mlir/CMakeLists.txt
@@ -1,5 +1,5 @@
# MLIR project.
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
@@ -11,6 +11,13 @@ include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
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(..)
diff --git a/mlir/examples/standalone/CMakeLists.txt b/mlir/examples/standalone/CMakeLists.txt
index 78395cf6ef4c..d36a6badc16d 100644
--- a/mlir/examples/standalone/CMakeLists.txt
+++ b/mlir/examples/standalone/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
project(standalone-dialect LANGUAGES CXX C)
set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)
diff --git a/openmp/CMakeLists.txt b/openmp/CMakeLists.txt
index 50246b663289..a87ea2fb57c5 100644
--- a/openmp/CMakeLists.txt
+++ b/openmp/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
@@ -12,6 +12,13 @@ list(INSERT CMAKE_MODULE_PATH 0
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(..)
diff --git a/openmp/cmake/DetectTestCompiler/CMakeLists.txt b/openmp/cmake/DetectTestCompiler/CMakeLists.txt
index 8ea7ab8d45ba..bc2aa52fbc1c 100644
--- a/openmp/cmake/DetectTestCompiler/CMakeLists.txt
+++ b/openmp/cmake/DetectTestCompiler/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
project(DetectTestCompiler C CXX)
include(CheckCCompilerFlag)
diff --git a/openmp/docs/SupportAndFAQ.rst b/openmp/docs/SupportAndFAQ.rst
index 0951ec1c2b55..4ccc2ae2963f 100644
--- a/openmp/docs/SupportAndFAQ.rst
+++ b/openmp/docs/SupportAndFAQ.rst
@@ -300,7 +300,7 @@ require a few additions.
.. code-block:: cmake
- cmake_minimum_required(VERSION 3.20.0)
+ cmake_minimum_required(VERSION 3.13.4)
project(offloadTest VERSION 1.0 LANGUAGES CXX)
list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp")
@@ -311,7 +311,7 @@ require a few additions.
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.20.0. Supported languages
+Using this module requires at least CMake version 3.13.4. 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.
diff --git a/openmp/libompd/src/CMakeLists.txt b/openmp/libompd/src/CMakeLists.txt
index 0402a0177201..f361fcf35a27 100644
--- a/openmp/libompd/src/CMakeLists.txt
+++ b/openmp/libompd/src/CMakeLists.txt
@@ -9,7 +9,7 @@
#
project (libompd)
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
add_library (ompd SHARED TargetValue.cpp omp-debug.cpp omp-state.cpp omp-icv.cpp)
diff --git a/openmp/libomptarget/plugins/remote/src/CMakeLists.txt b/openmp/libomptarget/plugins/remote/src/CMakeLists.txt
index 8a16963c913a..6299fb38ee8b 100644
--- a/openmp/libomptarget/plugins/remote/src/CMakeLists.txt
+++ b/openmp/libomptarget/plugins/remote/src/CMakeLists.txt
@@ -10,7 +10,7 @@
#
##===----------------------------------------------------------------------===##
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
# Define the suffix for the runtime messaging dumps.
add_definitions(-DTARGET_NAME=RPC)
diff --git a/openmp/runtime/cmake/LibompCheckLinkerFlag.cmake b/openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
index 0026347b1c14..bcc0ca80c866 100644
--- a/openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
+++ b/openmp/runtime/cmake/LibompCheckLinkerFlag.cmake
@@ -19,7 +19,7 @@ function(libomp_check_linker_flag flag boolean)
set(library_source
"int foo(int a) { return a*a; }")
set(cmake_source
- "cmake_minimum_required(VERSION 3.20.0)
+ "cmake_minimum_required(VERSION 3.13.4)
project(foo C)
set(CMAKE_SHARED_LINKER_FLAGS \"${flag}\")
add_library(foo SHARED src_to_link.c)")
diff --git a/openmp/tools/Modules/FindOpenMPTarget.cmake b/openmp/tools/Modules/FindOpenMPTarget.cmake
index 424294090d5d..3591a49f685b 100644
--- a/openmp/tools/Modules/FindOpenMPTarget.cmake
+++ b/openmp/tools/Modules/FindOpenMPTarget.cmake
@@ -79,7 +79,7 @@ be used to override the standard flag searching for a given compiler.
# TODO: Test more compilers
cmake_policy(PUSH)
-cmake_policy(VERSION 3.20.0)
+cmake_policy(VERSION 3.13.4)
find_package(OpenMP ${OpenMPTarget_FIND_VERSION} REQUIRED)
diff --git a/openmp/tools/Modules/README.rst b/openmp/tools/Modules/README.rst
index b8cc5f08b390..f19619e389b3 100644
--- a/openmp/tools/Modules/README.rst
+++ b/openmp/tools/Modules/README.rst
@@ -26,7 +26,7 @@ require a few additions.
.. code-block:: cmake
- cmake_minimum_required(VERSION 3.20.0)
+ cmake_minimum_required(VERSION 3.13.4)
project(offloadTest VERSION 1.0 LANGUAGES CXX)
list(APPEND CMAKE_MODULE_PATH "${PATH_TO_OPENMP_INSTALL}/lib/cmake/openmp")
@@ -37,7 +37,7 @@ require a few additions.
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.20.0. Supported languages
+Using this module requires at least CMake version 3.13.4. 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
diff --git a/polly/CMakeLists.txt b/polly/CMakeLists.txt
index 5d0f2cd7f00e..536f11f96829 100644
--- a/polly/CMakeLists.txt
+++ b/polly/CMakeLists.txt
@@ -1,7 +1,14 @@
# Check if this is a in tree build.
if (NOT DEFINED LLVM_MAIN_SRC_DIR)
project(Polly)
- cmake_minimum_required(VERSION 3.20.0)
+ 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()
set(POLLY_STANDALONE_BUILD TRUE)
endif()
diff --git a/pstl/CMakeLists.txt b/pstl/CMakeLists.txt
index 255e22af9a26..2461522349ee 100644
--- a/pstl/CMakeLists.txt
+++ b/pstl/CMakeLists.txt
@@ -5,7 +5,7 @@
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
#===----------------------------------------------------------------------===##
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
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 .*$")
diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt
index d4025644d128..50f782205ab4 100644
--- a/runtimes/CMakeLists.txt
+++ b/runtimes/CMakeLists.txt
@@ -1,5 +1,12 @@
# This file handles building LLVM runtime sub-projects.
-cmake_minimum_required(VERSION 3.20.0)
+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()
project(Runtimes C CXX ASM)
# Add path for custom and the LLVM build's modules to the CMake module path.