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

Make it possible to specify IncludeDir as system include path #49

Closed
christian-schilling opened this issue Oct 8, 2015 · 3 comments
Closed

Comments

@christian-schilling
Copy link
Member

This would be usefull to silence warnings generated for library headers.
See: https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html

@christian-schilling
Copy link
Member Author

Maybe it should be the default behaviour to use -isystem instead of -I if the IncludeDir was brought in by
a Dependency, at least for GCC.
This should only apply to dependencies from other projects, not to dependencies on a different config in the same Project.meta.

@aschaal
Copy link
Contributor

aschaal commented Dec 9, 2016

Automatic does not work. Problem here is: "All directories named by -isystem are searched after all directories named by -I, no matter what their order was on the command line." (see your linked spec)

Which means that e.g.

ExecutableConfig test {
IncludeDir x
Dependency y, config: mock
IncludeDir os/include
}

results in: -I -isystem -I<os/include>
Imagine y inherits some mock folders. This would probaly break the build, because the include folders defined in y are moved to the end.

Sure you could manually deactivate this feature, but imho opt-in should be used not opt-out.

---> I don't see any problem for manual tagging a system include directory (opt-in), e.g.

IncludeDir "include/os", system: true

Okay?

@aschaal
Copy link
Contributor

aschaal commented Dec 15, 2016

Aadded to 2.25.0
IncludeDir "include/os", system: true
A system include overrules a normal include.

@aschaal aschaal closed this as completed Dec 15, 2016
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

No branches or pull requests

2 participants