cc-rs
cc-rs copied to clipboard
Option to disable warnings entirely
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.
meanwhile:
fn main() {
cc::Build::new()
.file("hello.c")
.flag("-Wno-all")
.flag("-Wno-cpp")
.compile("hello");
}