Revert "[CMake] Bumps minimum version to 3.20.0."
authorMark de Wever <koraq@xs4all.nl>
Sat, 4 Mar 2023 17:28:13 +0000 (18:28 +0100)
committerMark de Wever <koraq@xs4all.nl>
Sat, 4 Mar 2023 17:28:13 +0000 (18:28 +0100)
Some build bots have not been updated to the new minimal CMake version.
Reverting for now and ping the buildbot owners.

This reverts commit 44c6b905f8527635e49bb3ea97dea315f92d38ec.

37 files changed:
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
libunwind/src/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 37a894702206afd292fd764093e44539b2d52026..7d177f7c598b1e2c9ab52573fdf0bbe1485333dc 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
 include(CheckIncludeFiles)
 include(GNUInstallDirs)
 
index 5a99d7a5edc3660cc890779c09e610c33e47cf30..be59c199f05f89ca66fdc86c1e5710b8bcd1f3e1 100644 (file)
@@ -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(..)
index 95c6fdb610e0f6c22cea1eaf75b489cd7bba5cfa..007ad4530d6dc2091135797b5c73a08ba1b1d71a 100644 (file)
@@ -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)
index ffd3a7e32438ed54041b44cccedd246d994aa739..8a13508fcb980bf7b346e6d4f9e3d3baf9591e54 100644 (file)
@@ -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")
index 5f509096fc7d4558e8eb0e3e5cac9121665cde8e..891a92f5e19b85327a23b1c26a0d404e1f5b041e 100644 (file)
@@ -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)
index 32fd61b1fa11edffe41f73c6082a0b4f050cbc88..771652f438f811976da529e9e39e9f32ac65766f 100644 (file)
@@ -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)
index 8c4c8957a0a96b7f89c28b3a584828b49ef37612..b048ea220e20ccccb9a21b9fe5569eeaa599f254 100644 (file)
@@ -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()
index 0a625923de887c03526bec6f6cf6818c2e87095f..5c5a498f1a3ca52dc39c9e842551eee013ecf770 100644 (file)
@@ -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)
 
index 2063ebc325d1ade942a4a5a0591d3813af4e396a..e0c93c220e95a94e2537ade843ed71d7a9ea25f2 100644 (file)
@@ -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)
 
index c2c8cfbd4103a662487e369d52f1f0c778e02e5b..743b241ce26addd6ce9c3f33cc2f456ff9e3a507 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
 
 # Default to C++17
 set(CMAKE_CXX_STANDARD 17)
index 1561cdc1c3bf55014e2d959c22fa073f5007b38f..89bf35c0340d096f01c4c8591ed822f5a1ac2a1e 100644 (file)
@@ -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(
index 1e273d45f50e2fee089f944a2375ee0e2aa260ef..89f08b889ea1e6b1e70ce2d5bcf7a25350483248 100644 (file)
@@ -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)
 
index c0c9a2760af736ab00e0f70a59b526b8f2cf20c5..0c1b2fe32f7ae4a707630242065d9e699fa57196 100644 (file)
@@ -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")
 
index 5950c286fea84d4349e2603ace184a126bc98605..4dd9f092dbf00732ee0ca33882d5795fe4502d4a 100644 (file)
@@ -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")
 
index bc667c8c8409273708fc9484aa2c75fd112716df..f82fa0a70eff2ae30a40b9374cb4edf307e13509 100644 (file)
@@ -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")
 
index 275cabc2e169ff7ba4b8ff4c96d93da5bef33f18..df32e53d69e6e83ce428424d4f1a6ae7657af7ef 100644 (file)
@@ -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()
 
index 0f95cf4f4c5dbe12a3c43a1965f14b2bdeb36c2e..3d6225646fe616fe28d9cd36e6209ee9846f351f 100644 (file)
@@ -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(..)
index 9ae6722295ac37d79771d2695293973d676fcce7..20d584c48bad14c9dbca99846e89fecbb027b0cc 100644 (file)
@@ -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(..)
index 74afea804598b71de3d2ad6ba7b3e998ce2075bd..4940ea488682a2acb3c2af0833a8adeb30ced245 100644 (file)
@@ -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}
index de42d908c37119d5cfbabd2551283ea1c61f2440..91c40bbf1cf3f28cc0e573b634a78af1679f557a 100644 (file)
@@ -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")
index bdaa6f84c0c529c836c44ed54c6e9908693a0637..c993ff53d134e976160b1470a4df8124c464371e 100644 (file)
@@ -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
index f97043b9d5f4a2a19e913b2ac6df0e72d844804e..7926de258ec8049497acd77f467908316b010abd 100644 (file)
@@ -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.
@@ -914,7 +914,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)
index 4458fbfcb04ac690ac46f57c436b176135528060..f2158a479d4f8d2e6e8089361ce304b62fbfc17e 100644 (file)
@@ -263,7 +263,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`
index 945bf3c2c1a16b0e66acb4cac9437c17b6f00176..10ffc60e8e8ea09f280450d0ca385347215d6895 100644 (file)
@@ -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
 ----------------------
 
index d91d1b105da46ded532f5cf9369df27de4e73084..c9b0d53bc3e94acddb91aa3e4cbd3ad553821b3a 100644 (file)
@@ -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(..)
index 78395cf6ef4c4e81cbc647fa3b80a19ed463c17f..d36a6badc16d690ae8c58950edd7159d69ddae77 100644 (file)
@@ -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)
index 50246b663289a509e45132fef6f226308e4cc5be..a87ea2fb57c516bafa5a748f349841ab3b4e5578 100644 (file)
@@ -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(..)
index 8ea7ab8d45ba1055d45b8cae2dff81e1126ad537..bc2aa52fbc1cfe1925743a5b4f3094423eda883a 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.20.0)
+cmake_minimum_required(VERSION 3.13.4)
 project(DetectTestCompiler C CXX)
 
 include(CheckCCompilerFlag)
index 0951ec1c2b555e6844c5dc27dc5fc8b7665ccda6..4ccc2ae2963fc4b460ed9cd9e374a132bb7edaa2 100644 (file)
@@ -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.
index 0402a017720104f2be2caf01007a6ed281547c80..f361fcf35a273e26bfb36cca8773731bf3ec7b54 100644 (file)
@@ -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)
 
index 8a16963c913a1aeb3e122041e7050e628ce5ba27..6299fb38ee8b467e9d59f31d8060e3f1229e355d 100644 (file)
@@ -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)
index 0026347b1c1473cab7dd919aaaf1e4c6a563e5ae..bcc0ca80c866e103e37b907673982d82a668a53a 100644 (file)
@@ -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)")
index 424294090d5d0f983dbcc33bc7ee3fd40e84fb85..3591a49f685b15e65cb000928bff700eef846ca3 100644 (file)
@@ -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)
 
index b8cc5f08b390b0411aa786ba25714545ead62c15..f19619e389b376fd16fc4fd3c4b9ca0d251a455c 100644 (file)
@@ -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
index ac5ab2c25a200d318da76dc7ca078a28878aa737..b81ce165b62fdc724c7f4937031419c2f24f56c4 100644 (file)
@@ -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()
 
index 255e22af9a26b1f79abaa1d34ad0d604c2f2ccd7..2461522349ee0e3d524335101cbc1ca55e796663 100644 (file)
@@ -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 .*$")
index d4025644d128d91d4a9689fb4d3398f051228228..50f782205ab48d2454472ab34937965a870d16c6 100644 (file)
@@ -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.