-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
include_directories(..., is_system: true) appears to be ignored (at least for GCC & Clang) #9219
Comments
We've never set |
ok, that makes sense. I was looking to specify my src directory as the base for all the
vs needing to always use a relative path like this:
Not a big deal, unless you're moving code around :). Would normalizing to allow some of the flexibility offered by the following (they appear in gcc and clang to be fairly uniform) would be accepted into meson?
|
Sorry for the bump, but I actually need it, because, if for example my header is named math.h and I don't want to use system's one, I can use quotes for including my own header and when I want system's one I can include it with <math.h>. A work-around is just to rename all headers with a prefix, but this could potentially destroy the project. When including <math.h> it could force to be my own header included first which could confuse the compiler itself and result in errors. EDIT: |
Hrm ... I came across this as I was also looking for a way to specify quote include paths, for a common static library, where I want to be able to #include "common/event_loop.h" But I don't want that to search system paths... Perhaps a proposal of adding is_quote to include_directories() alongside https://mesonbuild.com/Reference-manual_functions.html#arguments27 would be interesting, but I'm not sure what other specific use cases it would have. |
I also have an use for
So, for headers that I don't want to install in the system (i.e. private headers), I just However I started to rely heavily on code generators (e.g. I like @kbingham's |
include_directories(..., is_system: true) appears to be ignored for GCC & Clang
Regardless of if
is_system
is set to true or false, the compiler instruction is always-I
instead of what I'd expect (-iquote
) ifis_system: false
is set.To Reproduce
The below configuration in a meson.build file where you are building a c program helps highlight the issue:
Run:
When you inspect the compile step output you'll see something like this:
Expected behavior
I would expect the compiler output to look like this:
system parameters
meson --version
:0.59.0
ninja --version
:1.10.2
The text was updated successfully, but these errors were encountered: