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 system on gen headers #140

Merged

Conversation

v-lopez
Copy link
Contributor

@v-lopez v-lopez commented Sep 10, 2019

Adding SYSTEM here prevents compilation warnings from being displayed on the autogenerated headers.

And more importantly, if some of those warnings have been converted to build errors, ignores those errors and enables compilation.

@mjcarroll mjcarroll merged commit c706379 into ros:melodic-devel Sep 10, 2019
mjcarroll added a commit that referenced this pull request Mar 19, 2020
We discovered that there is an issue when building overlays with this in
place.  This didn't show up in the normal CI process where we don't
overlay.  The `SYSTEM` parameter causes gcc to use `-isystem`, which
does suppress warnings as the PR intended, but it also re-orders the
include paths, which can cause overlays to break.

Signed-off-by: Michael Carroll <michael@openrobotics.org>
mjcarroll added a commit that referenced this pull request Mar 19, 2020
We discovered that there is an issue when building overlays with this in
place.  This didn't show up in the normal CI process where we don't
overlay.  The `SYSTEM` parameter causes gcc to use `-isystem`, which
does suppress warnings as the PR intended, but it also re-orders the
include paths, which can cause overlays to break.

Signed-off-by: Michael Carroll <michael@openrobotics.org>
@mjcarroll
Copy link
Member

Just a heads up on this @v-lopez, we discovered that it causes issues with building in overlay workspaces, because -isystem paths are included after -I. I had to pull this out for now unless we can come up with a workaround that doesn't break overlays.

For reference, this discourse post has a pretty good minimal reproduction example: https://discourse.ros.org/t/preparing-for-melodic-sync-2020-03-12/13207/7

@v-lopez
Copy link
Contributor Author

v-lopez commented Mar 19, 2020

Thanks for letting me know, that's bad news :/
We've been forced to use SYSTEM in most of our code to be able to use stricter build flags, so I guess that's why we didn't see the issue.

I believe this may be due to the the fact that all ros header directories are installed on the same path.
So if I'm finding an installed package roscpp for instance, without SYSTEM, it's going to put it before my package parameter headers that use SYSTEM. And if my parameter headers are also installed they will be found first.

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.

None yet

2 participants