[PATCH] D78646: [CMake] Enforce the minimum CMake version to be at least 3.13.4

Louis Dionne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 08:38:27 PDT 2020


ldionne created this revision.
Herald added subscribers: llvm-commits, dexonsmith, jkorous, mgorny.
Herald added a project: LLVM.
ldionne added a parent revision: D77740: [CMake] Add a warning message to prepare the upcoming upgrade to CMake 3.13.4.
ldionne added a child revision: D78648: [CMake] Bump CMake minimum version to 3.13.4.
ldionne added reviewers: smeenai, tstellar, phosek, beanz, compnerd.
ldionne added a comment.

This review is for the upcoming CMake upgrade once we branch off the LLVM 11 release branch.

I won't apply it until after the branch has been created, which is around July.


This commit changes the warning for CMake < 3.13.4 into a fatal error.
The intent is to revert and re-apply this simple commit until all build
bots are migrated to CMake >= 3.13.4.

This is part of the effort discussed on llvm-dev here:

http://lists.llvm.org/pipermail/llvm-dev/2020-April/140578.html


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78646

Files:
  llvm/CMakeLists.txt


Index: llvm/CMakeLists.txt
===================================================================
--- llvm/CMakeLists.txt
+++ llvm/CMakeLists.txt
@@ -3,11 +3,9 @@
 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!")
+  message(FATAL_ERROR
+    "Your CMake version is ${CMAKE_VERSION}. The minimum version of CMake "
+    "required to build LLVM is now 3.13.4.")
 endif()
 
 if(POLICY CMP0068)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78646.259297.patch
Type: text/x-patch
Size: 742 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200422/6c8e044f/attachment-0001.bin>


More information about the llvm-commits mailing list