From d0bda9893bd98a69a49f01d612b2cf12bfd102b8 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Fri, 3 Mar 2023 20:43:59 +0100 Subject: [PATCH] Silence -Wcomment warnings in cxx compiler runs This is one of the few warnings we disable due to false positives. Let's also disable it in the preprocessing steps needed for the Rust build. Other warnings we ignore are -Wno-address -Wunused-local-typedefs and -Wunused-macros. I didn't add them here because I don't expect that they will be triggered by the headers we give to cxx. --- fish-rust/build.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fish-rust/build.rs b/fish-rust/build.rs index 4b60b664b..e76b193c7 100644 --- a/fish-rust/build.rs +++ b/fish-rust/build.rs @@ -41,6 +41,7 @@ fn main() -> miette::Result<()> { .include(&fish_src_dir) .include(&fish_build_dir) // For config.h .include(&cxx_include_dir) // For cxx.h + .flag("-Wno-comment") .compile("fish-rust"); // Emit autocxx junk. @@ -50,6 +51,7 @@ fn main() -> miette::Result<()> { .custom_gendir(autocxx_gen_dir.into()) .build()?; b.flag_if_supported("-std=c++11") + .flag("-Wno-comment") .compile("fish-rust-autocxx"); for file in source_files { println!("cargo:rerun-if-changed={file}");