compilers: Standardize the names of compiler options

Most options don't use language prefaced options (std vs c_std)
internally, as we don't need that due to namespacing. Let's do that
across the board
pull/7866/head
Dylan Baker 4 years ago
parent 3e62307f3a
commit a28a34c684
  1. 6
      mesonbuild/compilers/c.py
  2. 2
      mesonbuild/compilers/cpp.py
  3. 4
      mesonbuild/compilers/cuda.py

@ -615,7 +615,7 @@ class Xc16CCompiler(Xc16Compiler, CCompiler):
def get_options(self) -> 'OptionDictType':
opts = CCompiler.get_options(self)
opts.update({'c_std': coredata.UserComboOption('C language standard to use',
opts.update({'std': coredata.UserComboOption('C language standard to use',
['none', 'c89', 'c99', 'gnu89', 'gnu99'],
'none')})
return opts
@ -660,7 +660,7 @@ class CompCertCCompiler(CompCertCompiler, CCompiler):
def get_options(self) -> 'OptionDictType':
opts = CCompiler.get_options(self)
opts.update({'c_std': coredata.UserComboOption('C language standard to use',
opts.update({'std': coredata.UserComboOption('C language standard to use',
['none', 'c89', 'c99'],
'none')})
return opts
@ -698,7 +698,7 @@ class C2000CCompiler(C2000Compiler, CCompiler):
def get_options(self) -> 'OptionDictType':
opts = CCompiler.get_options(self)
opts.update({'c_std': coredata.UserComboOption('C language standard to use',
opts.update({'std': coredata.UserComboOption('C language standard to use',
['none', 'c89', 'c99', 'c11'],
'none')})
return opts

@ -790,7 +790,7 @@ class C2000CPPCompiler(C2000Compiler, CPPCompiler):
def get_options(self) -> 'OptionDictType':
opts = CPPCompiler.get_options(self)
opts.update({'cpp_std': coredata.UserComboOption('C++ language standard to use',
opts.update({'std': coredata.UserComboOption('C++ language standard to use',
['none', 'c++03'],
'none')})
return opts

@ -197,7 +197,7 @@ class CudaCompiler(Compiler):
def get_options(self) -> 'OptionDictType':
opts = super().get_options()
opts.update({'cuda_std': coredata.UserComboOption('C++ language standard to use',
opts.update({'std': coredata.UserComboOption('C++ language standard to use with cuda',
['none', 'c++03', 'c++11', 'c++14'],
'none')})
return opts
@ -212,7 +212,7 @@ class CudaCompiler(Compiler):
# the combination of CUDA version and MSVC version; the --std= is thus ignored
# and attempting to use it will result in a warning: https://stackoverflow.com/a/51272091/741027
if not is_windows():
std = options['cuda_std']
std = options['std']
if std.value != 'none':
args.append('--std=' + std.value)

Loading…
Cancel
Save