From 7f0224fb888cfe28d1e4ad913f33b8eb085eb83b Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 12 Dec 2019 13:43:33 -0800 Subject: compilers: make use of mlog.log_once I'm sure there are other places that could use this, but I didn't see any right off that bat. --- mesonbuild/compilers/c.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'mesonbuild/compilers/c.py') diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index db7abf0..6a91b8e 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -326,8 +326,6 @@ class IntelClCCompiler(IntelVisualStudioLikeCompiler, VisualStudioLikeCCompilerM """Intel "ICL" compiler abstraction.""" - __have_warned = False - def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, info: 'MachineInfo', exe_wrap, target, **kwargs): CCompiler.__init__(self, exelist, version, for_machine, is_cross, @@ -346,9 +344,7 @@ class IntelClCCompiler(IntelVisualStudioLikeCompiler, VisualStudioLikeCCompilerM args = [] std = options['c_std'] if std.value == 'c89': - if not self.__have_warned: - self.__have_warned = True - mlog.warning("ICL doesn't explicitly implement c89, setting the standard to 'none', which is close.") + mlog.warning("ICL doesn't explicitly implement c89, setting the standard to 'none', which is close.", once=True) elif std.value != 'none': args.append('/Qstd:' + std.value) return args -- cgit v1.1