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

Option to disable warnings entirely

Open nagisa opened this issue 6 years ago • 1 comments

Build::warnings() provides an option to set whether warnings are desired.

Calling Build::warnings(true) will pass in -Wall or a platform equivalent, however, counterintuitively, calling Build::warnings(false) will not pass a -w or a platform equivalent.

Either the option should be fixed to behave intuitively, or replaced with another intuitively-behaving method -- one that would actually suppress the warnings when called with false as an argument.

nagisa avatar Feb 11 '18 15:02 nagisa

meanwhile:

fn main() {
    cc::Build::new()
        .file("hello.c")
        .flag("-Wno-all")
        .flag("-Wno-cpp")
        .compile("hello");
}

milahu avatar Jun 30 '23 16:06 milahu