Skip to content

Commit

Permalink
Increase required CMake version to 3.5 (#2219)
Browse files Browse the repository at this point in the history
### 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](awslabs/aws-c-common#1178)
and [s2n-tls](aws/s2n-tls#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.
  • Loading branch information
andrewhop authored Mar 3, 2025
1 parent 913af96 commit 2c1b35b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 2c1b35b

Please sign in to comment.