isystem Include directories from pkg-config

257 views
Skip to first unread message

Dirk Vanden Boer

unread,
Mar 15, 2016, 6:36:39 AM3/15/16
to The Meson Build System
Hi,

When using dependency to add third party dependencies using pkg-config the found include directories are using the -I format which causes all warnings in third party headers to be visible in my project.

Is it possible craete an option to the dependency call that would convert the -I include to -isystem includes?

Thanks,
Dirk

Jussi Pakkanen

unread,
Mar 15, 2016, 4:07:08 PM3/15/16
to Dirk Vanden Boer, The Meson Build System
On Tue, Mar 15, 2016 at 12:36 PM, Dirk Vanden Boer <dirk...@gmail.com> wrote:
 
When using dependency to add third party dependencies using pkg-config the found include directories are using the -I format which causes all warnings in third party headers to be visible in my project.

Is it possible craete an option to the dependency call that would convert the -I include to -isystem includes?

We should be very careful when altering include flags provided by other people because that can go wrong. For example GCC's documentation says that if you specify a header dir with -isystem, it goes to the _end_ of the list of directories to search from, regardless of where it is on the command line. Subtle hidden changes in semantics should usually be avoided.

A proper solution would be to ask upstream to ship pkg-config files with isystem, these would then work with all build systems that use them. This is not really feasible in the short term, though. :(
 
Reply all
Reply to author
Forward
0 new messages