From b6a492500fd021111351ee2f1745eea148fa92fc Mon Sep 17 00:00:00 2001 From: Andrew Hopkins Date: Mon, 3 Mar 2025 14:45:08 -0800 Subject: [PATCH] Increase required CMake version to 3.5 (#2219) ### Description of changes: [CMake 4.0](https://cmake.org/cmake/help/latest/release/4.0.html) is coming out soon and requires cmake_minimum_required to be at least 3.5: > Compatibility with versions of CMake older than 3.5 has been removed. Calls to [cmake_minimum_required()](https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html#command:cmake_minimum_required) or [cmake_policy()](https://cmake.org/cmake/help/latest/command/cmake_policy.html#command:cmake_policy) that set the policy version to an older value now issue an error The [common runtime](https://github.com/awslabs/aws-c-common/pull/1178) and [s2n-tls](https://github.com/aws/s2n-tls/issues/4899) upgraded to 3.9 last year. ### Call-outs: This will break any customer using CMake version less than 3.5 which was [released in December https://github.com/Kitware/CMake/releases/tag/v3.5.0) By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license. --- .github/workflows/cmake.yml | 2 +- CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 10a108aa4b3..8a1c1bc3b05 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: cmake: - - { version: "3.2", url: "https://cmake.org/files/v3.2/cmake-3.2.3.tar.gz", hash: "a1ebcaf6d288eb4c966714ea457e3b9677cdfde78820d0f088712d7320850297" } + - { version: "3.5", url: "https://cmake.org/files/v3.5/cmake-3.5.0.tar.gz", hash: "92c83ad8a4fd6224cf6319a60b399854f55b38ebe9d297c942408b792b1a9efa" } - { version: "3.28", url: "https://cmake.org/files/v3.28/cmake-3.28.1.tar.gz", hash: "15e94f83e647f7d620a140a7a5da76349fc47a1bfed66d0f5cdee8e7344079ad" } generator: - "Unix Makefiles" diff --git a/CMakeLists.txt b/CMakeLists.txt index 1090cd53e6b..b4c6302cca5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.5..3.31) if(POLICY CMP0091) cmake_policy(SET CMP0091 NEW)