[llvm] 347226d - [CMake] Add a warning message to prepare the upcoming upgrade to CMake 3.13.4

Louis Dionne via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 08:07:56 PDT 2020


Author: Louis Dionne
Date: 2020-04-22T11:07:43-04:00
New Revision: 347226d1388f3eb6478a575d8f15c83a26edac01

URL: https://github.com/llvm/llvm-project/commit/347226d1388f3eb6478a575d8f15c83a26edac01
DIFF: https://github.com/llvm/llvm-project/commit/347226d1388f3eb6478a575d8f15c83a26edac01.diff

LOG: [CMake] Add a warning message to prepare the upcoming upgrade to CMake 3.13.4

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

Added: 
    

Modified: 
    llvm/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index b483dd421b3f..29a3fbade10e 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -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)


        


More information about the llvm-commits mailing list