-
Notifications
You must be signed in to change notification settings - Fork 138
Implement ament_add_default_options #390
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
Implement ament_add_default_options #390
Conversation
Should I also add a comment on Something like:
|
Signed-off-by: methylDragon <[email protected]>
02e9295
to
86a2dc5
Compare
# TODO(CH3): Would be good to parse args to skip options next time. | ||
set(options EXCLUDE_BUILD_SHARED_LIBS) | ||
set(oneValueArgs) | ||
set(multiValueArgs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since CMake macro()
s don't have a separate scope for variables, I'd recommend prefixing these variables to avoid collisions. Maybe options
-> _aado_options
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good idea, I've been spoilt with how it's been used in the ignition gz stack 😅
Signed-off-by: methylDragon <[email protected]>
I don't have write access, so if this is ok, feel free to merge it for me 👀 |
Note that this will need approval and CI run on it (via https://ci.ros2.org) before merging. |
Signed-off-by: methylDragon <[email protected]>
Signed-off-by: methylDragon <[email protected]>
ON) | ||
endif() | ||
|
||
unset(aado_options EXCLUDE_BUILD_SHARED_LIBS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a copy-paste error, but I think the EXCLUDE_BUILD_SHARED_LIBS
is not needed.
Signed-off-by: methylDragon <[email protected]>
* Implement ament_add_default_options Signed-off-by: methylDragon <[email protected]> * Mangle cmake_parse_arguments vars Signed-off-by: methylDragon <[email protected]> * Unset macro variables at end Signed-off-by: methylDragon <[email protected]> * Update comment and string Signed-off-by: methylDragon <[email protected]> * Refine macro unsets Signed-off-by: methylDragon <[email protected]>
This PR adds the
ament_add_default_options()
macro to allow for explicit invocation for common options.Currently only one option is contained in the macro (
BUILD_SHARED_LIBS
), but the macro can be extended.This will allow ros2/rmw_dds_common#62 to be merged (with the macro call).