Skip to content

Add fix for cmake control of CMAKE_BUILD_TYPE only if mbedtls is the root project - #3790

Merged
gilles-peskine-arm merged 1 commit into
Mbed-TLS:developmentfrom
peter-toft-greve:development
Oct 30, 2020
Merged

gilles-peskine-arm merged 1 commit into
Mbed-TLS:developmentfrom
peter-toft-greve:development

Conversation

@peter-toft-greve

@peter-toft-greve peter-toft-greve commented Oct 14, 2020 •

Copy link
Copy Markdown

The current CMakeLists.txt has problems when making integration to other projects also running cmake.
The current code traverses the CMAKE_BUILD_TYPE to the mother project, which can be anything - thus clearly problematic.
Especially if the mother project has their own sanitizers setup the current code invalidates that from the mother project.

With the patch the code will let the project using mbedtls control the build types.

Solves: #3789
Signed-off-by: peter-toft-greve

…root project

Signed-off-by: Peter Toft <peter.toft@dirac.com>
@paul-elliott-arm paul-elliott-arm self-assigned this Oct 14, 2020
@paul-elliott-arm paul-elliott-arm added Community needs-backports Backports are missing or are pending review and approval. needs-ci Needs to pass CI tests needs-reviewer This PR needs someone to pick it up for review labels Oct 14, 2020
@paul-elliott-arm

Copy link
Copy Markdown
Member

Could you copy the description from the commit message into the description here?

@peter-toft-greve

peter-toft-greve commented Oct 14, 2020 •

Copy link
Copy Markdown
Author

@paul-elliott-arm I have tried to update. Let me know if you suggest changes (or just update).
Thanx for the help

@peter-toft-greve

Copy link
Copy Markdown
Author

BTW, if you want this PR, feel free to merge this in at the time it fits your work schedule and release cycle - or tell me so 👍
Thanx for a great project.

@daverodgman
daverodgman self-requested a review October 15, 2020 10:15
@paul-elliott-arm paul-elliott-arm removed needs-backports Backports are missing or are pending review and approval. needs-ci Needs to pass CI tests labels Oct 15, 2020
@paul-elliott-arm
paul-elliott-arm self-requested a review October 15, 2020 11:59

@paul-elliott-arm paul-elliott-arm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good to me

@peter-toft-greve

Copy link
Copy Markdown
Author

@paul-elliott-arm two questions;

  • should I - or will you - merge when/if @daverodgman also approves?
  • you labelled this with "backports" - anything I need to do regarding this?

@paul-elliott-arm

Copy link
Copy Markdown
Member
  • should I - or will you - merge when/if @daverodgman also approves?
    If approval is given, we will merge this, no worries
  • you labelled this with "backports" - anything I need to do regarding this?
    I previously labelled this with backports as I was seeing as a bug and thus would need backporting to our LTS branches, however on reflection this is more of an enhancement, and generally we do not backport those.

@peter-toft-greve

Copy link
Copy Markdown
Author

@paul-elliott-arm others that can review?

@paul-elliott-arm

Copy link
Copy Markdown
Member

@paul-elliott-arm others that can review?

Its on the board in the right place, I am afraid we will need to wait for people to get the time to review it. Given its only a small patch, hopefully this won't take too long.

@d3zd3z d3zd3z left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is typically how this is done in CMake for other projects.

@paul-elliott-arm paul-elliott-arm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am happy with this too, it makes sense from my understanding.

@paul-elliott-arm paul-elliott-arm added approved Design and code approved - may be waiting for CI or backports and removed needs-reviewer This PR needs someone to pick it up for review labels Oct 29, 2020
@gilles-peskine-arm

Copy link
Copy Markdown
Contributor

The failure in pr-merge is a network glitch. Since the same job passed in earlier runs with the same content, this is as good as a pass.

@gilles-peskine-arm
gilles-peskine-arm merged commit 2da4292 into Mbed-TLS:development Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Design and code approved - may be waiting for CI or backports enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants