cc-rs icon indicating copy to clipboard operation
cc-rs copied to clipboard

Add `include_external` method

Open nawordar opened this issue 1 year ago • 1 comments

Including external headers can end up in emitting a lot of warnings, which are irrelevant to me, as I am not the author of these headers. GCC and Clang support the -isystem option which includes headers without generating warnings.

I suggest adding a include_external method which would add the -isystem option on GCC and Clang, and /external:I on MSVC.

nawordar avatar Aug 11 '23 13:08 nawordar

Came looking for this. If possible, I think an include_system(/my/external/library/path) or include_external(/my/external/library/path) would be great.

As a workaround, this seems to be working:

        .flag("-isystem/my/external/library/path/")

ntorresalberto avatar Mar 03 '24 23:03 ntorresalberto