-
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
Allow building as a subdir #5837
Allow building as a subdir #5837
Conversation
Tested by making a project that refers to Mbed TLS in this way - as a non-CMake expert this PR seems to address the problem (and doesn't introduce new cmake version requirements). |
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.
Please could you add a Changelog
Hi, every commit needs a "Signed-off-by" line, including the ChangeLog one, so would you mind updating that commit? |
0374966
to
8fa3a67
Compare
Fixes Mbed-TLS#5688 Signed-off-by: Robert Shade <[email protected]>
8fa3a67
to
591e729
Compare
It looks like this is failing on the FreeBSD CI (but only for internal CI, not on OpenCI). The log shows: `******************************************************************
Running tests... Test project /tmp/workspace/mbed-tls-pr-head_PR-5837-head/src/mbedtls_out_of_source_build
1/95 Test #1: aes.cbc-suite .............................. Passed 0.00 sec
2/95 Test #2: aes.cfb-suite .............................. Passed 0.00 sec
3/95 Test #3: aes.ecb-suite .............................. Passed 0.00 sec
............ [redacted a load of passing tests for brevity] ........... 93/95 Test #93: version-suite .............................. Passed 0.00 sec
94/95 Test #94: x509parse-suite ............................ Passed 0.44 sec
95/95 Test #95: x509write-suite ............................ Passed 0.30 sec 100% tests passed, 0 tests failed out of 95 Total Test time (real) = 24.06 sec ^^^^test_cmake_out_of_source: test: cmake 'out-of-source' build: ./tests/ssl-opt.sh -f 'Default' > ssl-opt.out 2> ssl-opt.err -> 1^^^^ Default ................................................................ PASS make[1]: Entering directory '/tmp/workspace/mbed-tls-pr-head_PR-5837-head/src/library' make[1]: Leaving directory '/tmp/workspace/mbed-tls-pr-head_PR-5837-head/src/library' make[1]: Entering directory '/tmp/workspace/mbed-tls-pr-head_PR-5837-head/src/programs' make[2]: Entering directory '/tmp/workspace/mbed-tls-pr-head_PR-5837-head/src/programs/fuzz' make[2]: Leaving directory '/tmp/workspace/mbed-tls-pr-head_PR-5837-head/src/programs/fuzz' make[1]: Leaving directory '/tmp/workspace/mbed-tls-pr-head_PR-5837-head/src/programs' make[1]: Entering directory '/tmp/workspace/mbed-tls-pr-head_PR-5837-head/src/tests' make[1]: Leaving directory '/tmp/workspace/mbed-tls-pr-head_PR-5837-head/src/tests'
|
The relevant part of the log is
which corresponds to
This is a sanity check for running SSL tests after an out-of-source build and the expected output is
The only expected reason why “Default” would pass but not “Default, DTLS” is a problem with And pr-merge is passing. So this looks like a mysterious one-off. |
@@ -0,0 +1,4 @@ | |||
Changes | |||
* Add aliases for libraries so that the normal MbedTLS::* targets |
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.
Please indicate clearly near the beginning that this is about CMake. For readers that don't have CMake in mind, the first sentence looks quite mysterious.
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.
Done in #5905.
I've re-triggered CI to see if it works this time |
Seems to be a one-off, CI is happy now. |
Since we don't have an update on the changelog wording for two weeks, I'm going to merge as-is. We can always tidy up the changelog later - I will make a note on the 3.2 release task. |
Great stuff! Shame we now need Jinja2 to build mbedtls. |
Allow building as a subdirectory (like with cmake FetchContent)
Fixes #5688
Signed-off-by: Robert Shade [email protected]
Status
READ
Requires Backporting
NO
Migrations
If there is any API change, what's the incentive and logic for it.
NO