-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[Backport 2.28] Pass MBEDTLS_CONFIG_FILE
defines through cmake
#6974
[Backport 2.28] Pass MBEDTLS_CONFIG_FILE
defines through cmake
#6974
Conversation
When -DMBEDTLS_CONFIG_FILE or -DMBEDTLS_USER_CONFIG_FILE are passed to cmake, pass them through as compile definitions. This allows different mbedtls configs to be passed at configure time without modifying any cmake files. Signed-off-by: David Horstmann <david.horstmann@arm.com>
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Signed-off-by: David Horstmann <david.horstmann@arm.com>
f6d1724
to
6762231
Compare
Rebased, one conflict on the addition of the |
For the MBEDTLS_CONFIG_FILE and MBEDTLS_USER_CONFIG_FILE variables, check that they are non-empty and defined. This means they can be unconditionally created in the cache, simplifying the CMakeLists.txt Signed-off-by: David Horstmann <david.horstmann@arm.com>
CMakeLists.txt
Outdated
@@ -135,6 +135,14 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) | |||
FORCE) | |||
endif() | |||
|
|||
# If set, make MBEDTLS_CONFIG_FILE and MBEDTLS_USER_CONFIG_FILE into PATHs | |||
if(DEFINED MBEDTLS_CONFIG_FILE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need these if(DEFINED ...)
blocks due to an older version of CMake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not, I had just forgotten to update the backport. This works the same way according to the docs I have for CMake 2.8.12, which is the oldest supported for this branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be a faithful backport
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, faithful backport
OpenCI error is unrelated to this PR, and the corresponding Internal CI job passed, so CI is green |
Signed-off-by: David Horstmann <david.horstmann@arm.com>
63b06a8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
OpenCI break appears to be an internal problem. Internal CI passed, so all good. |
Backport of #6914.
Conflicts:
library/CMakeLists.txt
- the code that adds include directories and definitions has changed between 2.28 and development.all.sh
- 2.28 does not have the CMake as-package and as-package install tests.Gatekeeper checklist
MBEDTLS_CONFIG_FILE
defines through cmake #6914