Skip to content
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

Use separate directory for external dependencies (platform lib, CMOS parameter lib, etc) #231

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

gavanderhoorn
Copy link
Collaborator

As per title.

This clearly separates those dependencies from MotoROS2 proper and additionally, prevents GCC from treating them as part of MotoROS2 itself.

Conversely, it prevents GCC from treating MotoROS2 sources as 'external', and thus disabling many of its checks and warnings.

Clearly separate them from MotoROS2 proper and additionally, prevent GCC
from treating them as part of MotoROS2 itself (conversely, prevent GCC
from treating MotoROS2 sources as 'external', and thus disabling many of
its checks and warnings).
@gavanderhoorn
Copy link
Collaborator Author

I was unsure as to whether this would work, but a test build (I've only tested the YRC1 configuration) seems to suggest it does.

@ted-miller: as you have more experience with this, could you please take a look?

I'm mostly trying to avoid the compiler marking the main src (project) directory as system, which then makes it ignore issues in that directory (which we don't want, obviously).

@ted-miller
Copy link
Collaborator

I'm mostly trying to avoid the compiler marking the main src (project) directory as system, which then makes it ignore issues in that directory (which we don't want, obviously)

What type of issues have you seen the compiler ignore?

@ted-miller
Copy link
Collaborator

I'm mostly trying to avoid the compiler marking the main src (project) directory as system

I have verified that the main project folder is passed with -I and not isystem.

Copy link
Collaborator

@ted-miller ted-miller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just did a batch build of all configurations and it worked fine. I'm just curious about the comment about the compiler ignoring issues.

@gavanderhoorn
Copy link
Collaborator Author

gavanderhoorn commented Apr 4, 2024

I'm doing some strange / unorthodox things locally which caused the src dir to be passed with -isystem instead of regular -I.

For normal use it doesn't really affect anything, but for the case(s) I describe having the external dependencies in a separate directory helps to avoid the -isystem.

It also doesn't seem to affect regular builds at all, so seems like a benign, if somewhat vaguely motivated, change.

@gavanderhoorn
Copy link
Collaborator Author

@ted-miller: just making sure: ok with me merging this?

@ted-miller
Copy link
Collaborator

Yep. All good.

@ted-miller ted-miller merged commit b3972ed into main Apr 8, 2024
5 of 14 checks passed
@ted-miller ted-miller deleted the introduce_lib_dir branch April 8, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants