-
Notifications
You must be signed in to change notification settings - Fork 10
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
Commit d74fe33 breaks project post-build execute steps #244
Comments
@EaselinkBachmann Thanks for reporting this. As it is implemented today an In the Open-CMSIS-Pack meeting from 2024-05-07 at the minute 41:00 I started demoing the |
I can confirm that building the Manually calling the CMake target works, but requires knowing the exact absolute path of the output file for IMO the description of
This works, but would potentially trigger the whole project to be built twice if one of the pre-build steps is an
This seems reasonable from an implementation strategy point of view, but is unexpected for users given the structure of the project yaml files (a user might expect
Thank you for the resource, I will look into it. |
The regression was fixed in #256 and will be part of the upcoming CMSIS-Toolbox release 2.5.0. Triggering "post-build" |
Thanks!
Yes, from local testing I can confirm this works. It also works to add an empty |
Since commit d74fe33 (Run cbuild2cmake per context), post-build execute steps in projects are no longer executed. Pre-build steps that create files needed by the build are still executed.
This is because all execute steps are created as separate targets in the "superlists"
CMakeLists.txt
, butcbuild
now invokes only theproject+context
target, which misses the post-build step targets.Reverting commits 6059425 and d74fe33 fixes the issue when building all contexts (default behaviour of cbuild). However, compiling single projects with
--context
does not run post-build steps (and also did not run post-build steps before the commit that broke this).Expected Behaviour
cbuild --cbuild2cmake mysolution.csolution.yml
should build all projects and their pre- and post-build steps.cbuild --cbuild2cmake mysolution.csolution.yml --context myproject+context
should build that project and its pre- and post-build steps.Actual Behaviour
cbuild --cbuild2cmake mysolution.csolution.yml
builds all projects and their pre-build steps, but no post-build steps (this was working before d74fe33)cbuild --cbuild2cmake mysolution.csolution.yml --context myproject+context
builds that project, but no post-build steps (this never worked)Example Executes Step
Potential Fixes
The most reliable fix is probably to create a separate CMake target that has dependencies on the main build step and all pre- and post-build steps for a project, and have
cbuild
invoke those targets instead of just the main build step target.Since execute steps are not associated with their corresponding projects at the moment in the
.cbuild-idx.yml
(the project/context name is only available as part of the execute string) this might need a bit of restructuring to implement properly.The text was updated successfully, but these errors were encountered: