-
Notifications
You must be signed in to change notification settings - Fork 824
[13884] Use a single optionparser header for all tools and examples #2508
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
[13884] Use a single optionparser header for all tools and examples #2508
Conversation
Signed-off-by: Miguel Barro <[email protected]>
Signed-off-by: Miguel Barro <[email protected]>
Signed-off-by: Miguel Barro <[email protected]>
…e nested headers issue (see https://github.com/HydrArgs/LeanAndMeanOptionParser) Signed-off-by: Miguel Barro <[email protected]>
Signed-off-by: Miguel Barro <[email protected]>
Signed-off-by: Miguel Barro <[email protected]>
@richiprosima please check style |
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.
LGTM! I have just left a comment regarding the header guard. Let me know what you think. I have tested successfully this PR in Ubuntu Focal.
#ifndef OPTIONPARSER_HPP_ | ||
#define OPTIONPARSER_HPP_ |
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.
Do you think there could be any conflict with other external header guards if Fast DDS is integrated in an external project? Maybe we should increase the uniqueness of the header guard with the path or a reference to Fast DDS.
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.
agreed. Let's try FASTDDS_OPTIONPARSER_HPP_
to match the target name
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.
In hindsight, you have uncovered an actual issue because the original file guard is OPTION_PARSER_H_
and will be enforced. Thus it's not possible to use our optionparser.hpp
with the original optionparser.h
in the same source file 🙇♂️.
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.
I miss the simplicity of #pragma once
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.
We are going to apply the workaround of disabling the internal OPTION_PARSER_H_
guard when using the outer one.
Signed-off-by: Miguel Barro <[email protected]>
3fbb3b1
to
d6ee157
Compare
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.
LGTM
This implies distributing the third-party header as an interface table to allow the examples to be built standalone.
The version of the parser used is this.
Windows installers have been successfully tested already.