Repository navigation
cmake: Avoid using target_properties for old cmake - #3845
Conversation
CMake versions less than 3.0 do not support the `target_sources` command. In order to be able to support v2.8.12.2 of cmake, directly set the SOURCES property instead of using the target_sources command. A future patch could reverse this, if the project decides to forgo support for cmake versions less than 3.0. Fixes Mbed-TLS#3801 Signed-off-by: David Brown <david.brown@linaro.org>
|
This is a direct translation of the This is admittedly a bit messy, but necessary if we wish to continue supporting v2.8.12.2 (Centos 7) of cmake. |
|
There are calls to target_sources in 2.16, we need to fix those as well I guess. Thus added "needs: backports" label . |
ronald-cron-arm
left a comment
There was a problem hiding this comment.
LGTM, I like this solution with a direct and systematic replacement for target_sources().
|
Unfortunately, this still doesn't fix the builds for Cmake 2.8.12. See #3897. It appears that in the old cmake, this target sources property is read only. The workaround for that involves changing how the targets are built up, since we need to know all of the sources by the time we reach that target. |
CMake versions less than 3.0 do not support the
target_sourcescommand. In order to be able to support v2.8.12.2 of cmake, directly
set the SOURCES property instead of using the target_sources command.
A future patch could reverse this, if the project decides to forgo
support for cmake versions less than 3.0.
Fixes #3801
Signed-off-by: David Brown david.brown@linaro.org
Status
READY/
Requires Backporting
Yes 2.16
Migrations
If there is any API change, what's the incentive and logic for it.
NO
Additional comments
Any additional information that could be of interest
Todos
Backport to 2.16: #3851
Steps to test or reproduce
Build using cmake 2.8.12.2.