From d40dc417389e09b26dd4177f50a06cf9889caf2f Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Wed, 9 Nov 2022 18:08:54 +0100 Subject: [CMake] Warn when the version is older than 3.20.0. This is a preparation to require CMake 3.20.0 after LLVM 16 has been released. This change has been discussed on discourse https://discourse.llvm.org/t/rfc-upgrading-llvms-minimum-required-cmake-version/66193 Reviewed By: #libc_vendors, MaskRay, ChuanqiXu, to268, thieta, stellaraccident, ldionne, #libc, #libc_abi, phosek Differential Revision: https://reviews.llvm.org/D137724 --- runtimes/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'runtimes') diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index a735096..1626b7b 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.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. -- cgit v1.1