Skip to content

cmake: Bump minimum cmake to 3.20.0 #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: zephyr
Choose a base branch
from

Conversation

ceolin
Copy link
Member

@ceolin ceolin commented Jul 11, 2025

Zephyr uses cmake 3.20.0 as the minimum version for a long time. Set the same requirement here to avoid possible issues in future.

Copy link
Collaborator

@tomi-font tomi-font left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we start marking those local patches (in the commit title) just as you did for the update to 3.6.4?

@ceolin
Copy link
Member Author

ceolin commented Jul 11, 2025

Can we start marking those local patches (in the commit title) just as you did for the update to 3.6.4?

I want to document it first. It is better to come up with some agreement regarding tag names. We have discussed it in the security committee and there is a consensus about using it.

@valeriosetti
Copy link
Collaborator

I'm not against this change, but I have a question/doubt about the its goal.

In Zephyr we're currently building Mbed TLS by individually selecting source files to be included into the build (this happens in https://github.com/zephyrproject-rtos/zephyr/blob/main/modules/mbedtls/CMakeLists.txt) so from the Zephyr's perspective this change is irrelevant unless we plan to change the Mbed TLS' integration pattern to use CMake's add_subdirectory() instead. Is that the plan behind this change?

TF-M instead builds Mbed TLS using add_subdirectory() in the CMakeLists file, however TF-M main CMake file already sets the minimum version to 3.21, so I don't see the advantage also from this point of view.

@tomi-font
Copy link
Collaborator

I'm not against this change, but I have a question/doubt about the its goal.

In Zephyr we're currently building Mbed TLS by individually selecting source files to be included into the build (this happens in https://github.com/zephyrproject-rtos/zephyr/blob/main/modules/mbedtls/CMakeLists.txt) so from the Zephyr's perspective this change is irrelevant unless we plan to change the Mbed TLS' integration pattern to use CMake's add_subdirectory() instead. Is that the plan behind this change?

TF-M instead builds Mbed TLS using add_subdirectory() in the CMakeLists file, however TF-M main CMake file already sets the minimum version to 3.21, so I don't see the advantage also from this point of view.

I believe the goal is just to silence the warning caused by this when compiling TF-M indeed: zephyrproject-rtos/zephyr#92679

Zephyr uses cmake 3.20.0 as the minimum version for a long
time. Set the same requirement here to avoid possible issues
in future.

Fixes zephyrproject-rtos/zephyr#92679

Signed-off-by: Flavio Ceolin <[email protected]>
Signed-off-by: Tomi Fontanilles <[email protected]>
@tomi-font
Copy link
Collaborator

Force pushed to reference the Zephyr issue in the commit message.

@valeriosetti
Copy link
Collaborator

Force pushed to reference the Zephyr issue in the commit message.

Thanks! It looks clearer now to me :)

Copy link

@frkv frkv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants