Generate build artifacts to binary dir instead of source tree#1164
Open
julianoes wants to merge 1 commit intoeclipse-zenoh:mainfrom
Open
Generate build artifacts to binary dir instead of source tree#1164julianoes wants to merge 1 commit intoeclipse-zenoh:mainfrom
julianoes wants to merge 1 commit intoeclipse-zenoh:mainfrom
Conversation
configure_file() calls were writing zenoh-pico.h, config.h, library.json, and zenohpico.pc directly into the source tree, causing dirty working directories when zenoh-pico is used as a submodule. Generate these files to CMAKE_CURRENT_BINARY_DIR instead and add it to the include path so the generated headers are found. Remove the generated files from the repository since they should no longer be needed in-tree. Update install rules to reference the new locations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7ac1544 to
e1fac34
Compare
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.
Description
configure_file() calls were writing zenoh-pico.h, config.h, library.json, and zenohpico.pc directly into the source tree, causing dirty working directories when zenoh-pico is used as a submodule.
What does this PR do?
Generate these files to CMAKE_CURRENT_BINARY_DIR instead and add it to the include path so the generated headers are found. Remove the generated files from the repository since they should no longer be needed in-tree.
Update install rules to reference the new locations.
This also removes the library.json file in the source. As this file is not installed, it's not 100% clear to me where this is used/needed.
Why is this change needed?
This prevents the submodule being marked dirty when used in PX4.
Related Issues
Alternative to #1137.
🏷️ Label-Based Checklist
No specific label requirements detected.
Current labels: No labels
Add one of these labels to this PR to see relevant checklist items:
api-sync,breaking-change,bug,ci,dependencies,documentation,enhancement,new feature,internalThis section updates automatically when labels change.