esp-rs / embuild

Build support for embedded Rust: Cargo integration with other embedded build ecosystems & tools, like PlatformIO, CMake and kconfig.
Apache License 2.0
135 stars 38 forks source link

Use `-isystem` to suppress warnings from esp-idf headers #62

Closed codysch closed 1 year ago

codysch commented 2 years ago

When folks use the esp-idf includes (via embuild::build::CInclArgs::try_from_env("ESP_IDF")) to build c code in their crates, depending on the warnings they enable for their code, some warnings might be emitted for code in the esp-idf headers (for example, unused arguments).

Use the -isystem flag to mark the esp-idf provided header paths as "system" provided, which suppresses the warnings which would be emitted from headers included from these paths.

N3xed commented 1 year ago

Thanks!