OSDN Git Service

[CMake] Add a warning message to prepare the upcoming upgrade to CMake 3.13.4
authorLouis Dionne <ldionne@apple.com>
Wed, 8 Apr 2020 16:26:59 +0000 (12:26 -0400)
committerLouis Dionne <ldionne@apple.com>
Wed, 22 Apr 2020 15:07:43 +0000 (11:07 -0400)
As discussed in http://lists.llvm.org/pipermail/llvm-dev/2020-March/140349.html,
the minimum version of CMake required to build LLVM will be upgraded to
3.13.4 right after we create the release branch for LLVM 11.0.0.

As part of this effort, this commit adds a warning to give a heads up
to folks regarding the upcoming upgrade. This should allow users to
upgrade their CMake in advance so that the upgrade can sail right
through when the time comes.

Differential Revision: https://reviews.llvm.org/D77740

llvm/CMakeLists.txt

index b483dd4..29a3fba 100644 (file)
@@ -2,6 +2,14 @@
 
 cmake_minimum_required(VERSION 3.4.3)
 
+if ("${CMAKE_VERSION}" VERSION_LESS "3.13.4")
+  message(WARNING
+    "Your CMake version is ${CMAKE_VERSION}. Starting with LLVM 12.0.0, the "
+    "minimum version of CMake required to build LLVM will become 3.13.4, and "
+    "using an older CMake will become an error. Please upgrade your CMake to "
+    "at least 3.13.4 now to avoid issues in the future!")
+endif()
+
 if(POLICY CMP0068)
   cmake_policy(SET CMP0068 NEW)
   set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)