Re: How to use -isystem instead of -I to include directories of third-party projects in scons?
Mats Wichmann <[email protected]>
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <[email protected]> |
On November 30, 2022 12:10:20 AM MST, Lan Yang <[email protected]> wrote: >Hi scons users, > >1. My question is: >how to use -isystem instead of -I to include directories of third-party >projects in scons? > >2. Question's background: >Recently, I found that by adding -Wall and -Wextra to CFLAGS can raise the >compilation warning level. >And this exposes some hidden bugs. > >But I do not wish to edit the warnings in the 3rd party code. >So I found a gcc's solution in stack-overflow: >https://stackoverflow.com/questions/15053776/how-do-you-disable-the-unused-variable-warnings-coming-out-of-gcc-in-3rd-party-c > >The top solution recommends me keeping the warning on, but use -isystem >instead of -I to include directories of third-party projects. >Then I used the "scons --verbose" and found that the scons used "-I" by >default. > >Best regards, >Lan > >-- > > > > >*CONFIDENTIALITY NOTICE: The contents of this email and any attachments >are intended solely for the addressee(s) and contain confidential and/or >privileged information and are legally protected from disclosure unless >otherwise indicated. If you received this message by mistake, please >immediately alert the sender by reply email and then delete this message >and any attachments. If you are not the intended recipient, you are hereby >notified that any use, dissemination, copying, or storage of this message >or its attachments is strictly prohibited. * Your approach is a valid one, but SCons does not, unfortunately support -isystem fully (issue #3064 exists to record this). You can add it directly to CCFLAGS and it should be emitted to gcc; and the MergeFlags method knows how to do this also, but - unlike for values in CPPPATH - SCons won't look in that directory for internal dependency calculation. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users