aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-07-08 10:13:31 -0700
committerEli Schwartz <eschwartz93@gmail.com>2023-01-03 14:49:02 -0500
commitf7cde8d3f62c0ae0ef445698a407d1bdb2218cd6 (patch)
tree56a4129e486cdb2ae73b7fb5c5fb00168ce0c138 /mesonbuild/compilers
parent0a873f6470bf4e621f1ce2eeb250b5f5b918ac63 (diff)
downloadmeson-f7cde8d3f62c0ae0ef445698a407d1bdb2218cd6.zip
meson-f7cde8d3f62c0ae0ef445698a407d1bdb2218cd6.tar.gz
meson-f7cde8d3f62c0ae0ef445698a407d1bdb2218cd6.tar.bz2
Add fatal=False to many mlog.warnings()
There are lots of warnings that become fatal, that are simply unfixable by the end user. Things like using old versions of software (because they're using some kind of LTS release), warnings about compilers not supporting certain kinds of checks, or standards being upgraded due to skipped implementations (MSVC has c++98 and c++14, but not c++11). None of these should be fatal, they're informative, and too important to reduce to notices, but not important enough to stop meson if they're printed.
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r--mesonbuild/compilers/cpp.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py
index 7296626..5789bb5 100644
--- a/mesonbuild/compilers/cpp.py
+++ b/mesonbuild/compilers/cpp.py
@@ -59,7 +59,7 @@ def non_msvc_eh_options(eh: str, args: T.List[str]) -> None:
args.append('-fno-exceptions')
elif eh in {'s', 'c'}:
mlog.warning(f'non-MSVC compilers do not support {eh} exception handling. '
- 'You may want to set eh to \'default\'.')
+ 'You may want to set eh to \'default\'.', fatal=False)
class CPPCompiler(CLikeCompiler, Compiler):
def attribute_check_func(self, name: str) -> str:
@@ -692,7 +692,8 @@ class CPP11AsCPP14Mixin(CompilerMixinBase):
key = OptionKey('std', machine=self.for_machine, lang=self.language)
if options[key].value in {'vc++11', 'c++11'}:
mlog.warning(self.id, 'does not support C++11;',
- 'attempting best effort; setting the standard to C++14', once=True)
+ 'attempting best effort; setting the standard to C++14',
+ once=True, fatal=False)
# Don't mutate anything we're going to change, we need to use
# deepcopy since we're messing with members, and we can't simply
# copy the members because the option proxy doesn't support it.
@@ -732,7 +733,7 @@ class VisualStudioCPPCompiler(CPP11AsCPP14Mixin, VisualStudioLikeCPPCompilerMixi
def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]:
key = OptionKey('std', machine=self.for_machine, lang=self.language)
if options[key].value != 'none' and version_compare(self.version, '<19.00.24210'):
- mlog.warning('This version of MSVC does not support cpp_std arguments')
+ mlog.warning('This version of MSVC does not support cpp_std arguments', fatal=False)
options = copy.copy(options)
options[key].value = 'none'