aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/cpp.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/compilers/cpp.py')
-rw-r--r--mesonbuild/compilers/cpp.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py
index ebe3a4f..4d55ccd 100644
--- a/mesonbuild/compilers/cpp.py
+++ b/mesonbuild/compilers/cpp.py
@@ -65,7 +65,7 @@ class CPPCompiler(CLikeCompiler, Compiler):
try:
return CXX_FUNC_ATTRIBUTES.get(name, C_FUNC_ATTRIBUTES[name])
except KeyError:
- raise MesonException('Unknown function attribute "{}"'.format(name))
+ raise MesonException(f'Unknown function attribute "{name}"')
language = 'cpp'
@@ -129,10 +129,10 @@ class CPPCompiler(CLikeCompiler, Compiler):
CPP_TEST = 'int i = static_cast<int>(0);'
with self.compile(CPP_TEST, extra_args=[cpp_std_value], mode='compile') as p:
if p.returncode == 0:
- mlog.debug('Compiler accepts {}:'.format(cpp_std_value), 'YES')
+ mlog.debug(f'Compiler accepts {cpp_std_value}:', 'YES')
return True
else:
- mlog.debug('Compiler accepts {}:'.format(cpp_std_value), 'NO')
+ mlog.debug(f'Compiler accepts {cpp_std_value}:', 'NO')
return False
@functools.lru_cache()
@@ -166,7 +166,7 @@ class CPPCompiler(CLikeCompiler, Compiler):
if self._test_cpp_std_arg(cpp_std_value):
return cpp_std_value
- raise MesonException('C++ Compiler does not support -std={}'.format(cpp_std))
+ raise MesonException(f'C++ Compiler does not support -std={cpp_std}')
def get_options(self) -> 'KeyedOptionDictType':
opts = super().get_options()
@@ -615,7 +615,7 @@ class VisualStudioLikeCPPCompilerMixin(CompilerMixinBase):
permissive, ver = self.VC_VERSION_MAP[options[key].value]
if ver is not None:
- args.append('/std:c++{}'.format(ver))
+ args.append(f'/std:c++{ver}')
if not permissive:
args.append('/permissive-')