Fix component registering in subdirectories#3064
Conversation
Signed-off-by: pum1k <55055380+pum1k@users.noreply.github.com>
fujitatomoya
left a comment
There was a problem hiding this comment.
lgtm with green CI.
i think that the approach of using directory properties on PROJECT_SOURCE_DIR is the right fix to avoid the CMake variable scoping problem cleanly without polluting the cache.
one minor suggestion: would it be worth adding a brief comment in the hook file explaining why properties are used like original problem?
Signed-off-by: pum1k <55055380+pum1k@users.noreply.github.com>
|
@fujitatomoya Is this what you meant? |
|
Pulls: #3064 |
|
@ahcorde Could this be backported to Jazzy? |
|
https://github.com/Mergifyio backport kilted jazzy humble |
✅ Backports have been createdDetails
|
Signed-off-by: pum1k <55055380+pum1k@users.noreply.github.com> (cherry picked from commit fc1afcb)
Signed-off-by: pum1k <55055380+pum1k@users.noreply.github.com> (cherry picked from commit fc1afcb)
Signed-off-by: pum1k <55055380+pum1k@users.noreply.github.com> (cherry picked from commit fc1afcb)
Description
This PR allows using
rclcpp_components_register_nodeandrclcpp_components_register_nodesfunctions in subdirectories added byadd_subdirectory(and other non global scopes). This was done by storing the internal data in a property of the project directory instead of variable.Fixes: #1698
Is this user-facing behavior change?
Yes, users will be able to use the above mentioned functions inside nested scopes.
Did you use Generative AI?
No