Hi,
Just my two pence.
Back when the build system was made, we found random issues when people were using various cmake versions. Hence the decision was made to require a specific version since older CMake binaries are easily available for most OSs. Thus, IMHO a version upgrade shall not be an issue if testing reveals no issues, and v3.21 could be just fine.
TLDR IMHO there are two things to consider:
* How the upgrade affects complexity of setting up the build environment? As I mentioned any CMake binary is available for most OSs, so this was not considered to be an issue earlier. As v3.15 is not available in most OSs by default, jumping to any recent version will not affect this significantly. Of course, the policy could be changed if needed, e.g. to upgrade to a version which is available in the package repository of the oldest still supported Ubuntu LTS version (or similar). (At a quick glance Ubuntu 20.04 LTS (Focal) defaults to cmake v3.15 and 3.16.3 is available as an update. For 22.04 LTS (Jammy) the newest version available is 3.22.) * If the new version does not introduce regression. This should be verified with testing.
/George
From: David Hu via TF-M tf-m@lists.trustedfirmware.org Sent: Thursday, December 7, 2023 11:15 AM To: tf-m@lists.trustedfirmware.org Cc: nd nd@arm.com Subject: [TF-M] Re: [RFC] Bump minimum CMake version required
Hi all,
May I know if you have any concerns about bumping CMake version? Do you mind reviewing the following patches? Build: Clean up unnecessary cmake_policy() | https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/25331 Build: Bump CMake mini version to 3.21 | https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/25309
Build scripts are simplified after CMake version is updated.
Best regards, Hu Ziji
From: David Hu via TF-M <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Date: Friday, December 1, 2023 at 23:05 To: tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: nd <nd@arm.commailto:nd@arm.com> Subject: [TF-M] [RFC] Bump minimum CMake version required Hi all,
The current minimum CMake version specified in TF-M is 3.15. It is quite out-of-date. I'd like to propose to increase minimum CMake version to 3.21.
CMake 3.21 can bring in some benefits, compared to CMake 3.15
* NEW behavior of several CMake policies, such as CMP0123 for Armclang. * After build split, TF-M secure build installs several build scripts. When NS build includes those build scripts, `CMAKE_CURRENT_FUNCTION_LIST_FILE/DIR` can make it easier to handle source code paths.
CMake 3.21 was released 2 years ago. It should be stable enough now.
May I know if you have any feedback or different opinions? Thank you.
Best regards, Hu Ziji