Repository navigation
cmake: Fix added sources to targets - #3897
Merged
Merged
Conversation
In cmake version < 3.0, the SOURCES property on targets cannot be modified after the target is defined. There are several instances in the code that were using `target_properties()`, which is not available in the older versions of cmake. Unfortunately, the workaround in Mbed-TLS#3801 (381c107) assumes that this SOURCES property can be modified. Work around this by building up any necessary sources before declaring the target. This is more awkward, but needed to continue to be able to support the old versions of cmake. Fixes Mbed-TLS#3788. Signed-off-by: David Brown <david.brown@linaro.org>
Contributor
Author
|
Can someone from Arm paste in the relevant errors from the CI builds? Thanks. |
paul-elliott-arm
self-requested a review
December 4, 2020 15:57
1 of 4 tasks
Contributor
|
pr-merge passed on a8e309e but didn't report to GitHub. pr-head only failed due to a network glitch, and pr-merge passed so it doesn't matter. |
Contributor
|
@d3zd3z The CI fully passed, but the pr-merge job just failed to report to github. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In cmake version < 3.0, the SOURCES property on targets cannot be
modified after the target is defined. There are several instances in
the code that were using
target_properties(), which is not availablein the older versions of cmake. Unfortunately, the workaround in #3801
(381c107) assumes that this SOURCES property can be modified.
Work around this by building up any necessary sources before declaring
the target. This is more awkward, but needed to continue to be able to
support the old versions of cmake.
Fixes #3788
Signed-off-by: David Brown david.brown@linaro.org
Status
READY
Requires Backporting
Yes, but I don't think it applies.
Migrations
NO
Todos
Steps to test or reproduce
Outline the steps to test or reproduce the PR here.
$ mkdir build $ cd build $ cmake-2.18.12.2 .. $ make