apps/cmake: Remove stale in-source builtin headers#3493
Closed
toku-mac wants to merge 1 commit into
Closed
Conversation
Add state to remove in-source generated headers, so that builtin_list.c does not include them before the generated ones. Signed-off-by: Shoji Tokunaga <toku@mac.com>
xuxin930
reviewed
May 22, 2026
| if(CONFIG_BUILTIN) | ||
| # Out-of-tree builds generate these headers in the binary directory. Remove | ||
| # stale in-source copies to avoid accidental inclusion. | ||
| if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR) |
Contributor
There was a problem hiding this comment.
In the nuttx/main CMakeLists generator phase, it actively checks for any remnants of make artifacts.
If any remnants of a previous make.config file are found, a fatal error will occur.
So, the assumption here is that only a portion of make distclean is cleaned up?
In that case, the problem to solve should be to perform a complete distclean.
Contributor
Author
There was a problem hiding this comment.
I tried various methods to reproduce this state.
- Manual configuration changes via CLI commands
- Automatic processing of CMakeLists.txt by IDE
It seems there's an issue when running these simultaneously.
Following the proper workflow should prevent this problem, so I'll withdraw this pull request.
Thank you.
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.
apps/cmake: Remove stale in-source builtin headers
Summary
Remove stale in-source generated builtin headers during out-of-tree CMake builds.
Impact
apps/builtin/builtin_list.handapps/builtin/builtin_proto.hgenerated by previous in-source or Make builds.Testing
I confirm that changes are verified on local setup and works as intended:
Configuration:
hello_rust_cargoto a valid state, then build it usingmake.make distcleanfails, leaving~/apps/builtin/builtin_list.handbuiltin_proto.hintact.Testing logs before change:
Testing logs after change:
At
cmake -S . -B build-default -DBOARD_CONFIG=nucleo-h563zi:nsh -GNinjastage,apps/builtin/builtin_list.handapps/builtin/builtin_proto.hare removed.PR verification Self-Check