2 ms·
for one thing, pkg-config really should do -isystem instead of -I for headers, -isystem helps editor to not bother checking them for syntax conformity, otherwis
by synergy20 4y ago
for one thing, pkg-config really should do -isystem instead of -I for headers, -isystem helps editor to not bother checking them for syntax conformity, otherwise my vi sometimes produces thousands of lines of warnings for those standard header files, and I have to add isystem to them manually. cmake smartly converts pkg-config's -I to -isystem nowadays, which is great.
- saurik 4y agoThat really seems like it should be the purview of the build system (such as cmake), not pkg-config. The flags provided by pkg-config should be as simple and obvious and easy to reason about and as portable as possible (and, worst case, as consistent as possible so you can convert it to some different flag format, as arguably is being done there by cmake). The goal of -isystem has nothing to do with syntax highlighting, even if your text editor may also be reading it (though I am unsure from where, lol)... it has non-trivial effects on things like #include path ordering.
- synergy20 4y agomake sense,thanks