Cannot disable warnings in subproject -- warning_level should offer option to pass `-w` to GCC and Clang
See original GitHub issueIn the release notes for Meson 0.50.0 is stated that a warning level of 0 does not enable any static analysis checks. GCC and Clang have a flag that does just that, -w
, but it seems that Meson doesn’t pass it to the compiler.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Suppressing Warnings in GCC and Clang
Using command line options to suppress the warning. 2 Sample Project. I want to showcase all 7 different ways how to deal with...
Read more >Warning Options (Using the GNU Compiler Collection (GCC))
This option controls warnings when a function is used before being declared. This warning is enabled by default in C99 and later dialects...
Read more >Built-in options - The Meson Build system
Meson provides two kinds of options: build options provided by the build files and built-in options that are either universal options, base options,...
Read more >Support target_compile_warnings() to set warning like -Wall ...
And Add options to enable all compiler warnings and to treat compiler ... DISABLED (expands to "-w" for clang/gcc/msvc), HIGH (expands to ...
Read more >B2 User Manual - 1.81.0 - Boost C++ Libraries
For example, when building with <toolset>gcc alternative (2), will be ... This means that for B2, you cannot directly obtain a build variant...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Disabling warnings in a subproject is an interesting angle that unfortunately wasn’t mentioned in the OP.
And apparently, it turns out you cannot use
-Dsubproject:c_args=-w
, since c_args is not per subproject. So that shoots down my initial thought on how to do this. Which means adding a warning_level that does it, would be an understandable desire.Looking at the issue tracker it seems that specifying
*_args
per subproject is something that has been needed/wanted for quite some time.Even if implementing this using warning_level could be easier, I think what maybe using
c_args
would be better; passing warning-related options usingc_args
is a sort of hack, but a negativewarning_level
would also look like a hack, so if I had to choose I would use an already present hack rather than introducing a new one.But maybe I’m wrong, who knows