aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-12-05 00:13:27 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2017-12-07 00:00:34 +0200
commit4ae0cadb7f951691e2913a660a61d024d04b5485 (patch)
tree2a4d6846ae3f90ebb398bd467f20d9c81f988eed /mesonbuild
parentc2d23dd6789441f7972ded003d77c0bda3fb121b (diff)
downloadmeson-4ae0cadb7f951691e2913a660a61d024d04b5485.zip
meson-4ae0cadb7f951691e2913a660a61d024d04b5485.tar.gz
meson-4ae0cadb7f951691e2913a660a61d024d04b5485.tar.bz2
Renamed UserStringArrayOption to UserArrayOption for short.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/compilers/c.py10
-rw-r--r--mesonbuild/compilers/cpp.py8
-rw-r--r--mesonbuild/coredata.py3
-rw-r--r--mesonbuild/mintro.py2
-rw-r--r--mesonbuild/optinterpreter.py2
5 files changed, 12 insertions, 13 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index 2d12314..0f92e78 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -839,8 +839,8 @@ class GnuCCompiler(GnuCompiler, CCompiler):
'none')}
if self.gcc_type == GCC_MINGW:
opts.update({
- 'c_winlibs': coredata.UserStringArrayOption('c_winlibs', 'Standard Win libraries to link against',
- gnu_winlibs), })
+ 'c_winlibs': coredata.UserArrayOption('c_winlibs', 'Standard Win libraries to link against',
+ gnu_winlibs), })
return opts
def get_option_compile_args(self, options):
@@ -1012,9 +1012,9 @@ class VisualStudioCCompiler(CCompiler):
return []
def get_options(self):
- return {'c_winlibs': coredata.UserStringArrayOption('c_winlibs',
- 'Windows libs to link against.',
- msvc_winlibs)
+ return {'c_winlibs': coredata.UserArrayOption('c_winlibs',
+ 'Windows libs to link against.',
+ msvc_winlibs)
}
def get_option_link_args(self, options):
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py
index 48e6a51..cb4b055 100644
--- a/mesonbuild/compilers/cpp.py
+++ b/mesonbuild/compilers/cpp.py
@@ -110,7 +110,7 @@ class GnuCPPCompiler(GnuCompiler, CPPCompiler):
False)}
if self.gcc_type == GCC_MINGW:
opts.update({
- 'cpp_winlibs': coredata.UserStringArrayOption('cpp_winlibs', 'Standard Win libraries to link against',
+ 'cpp_winlibs': coredata.UserArrayOption('cpp_winlibs', 'Standard Win libraries to link against',
gnu_winlibs), })
return opts
@@ -188,9 +188,9 @@ class VisualStudioCPPCompiler(VisualStudioCCompiler, CPPCompiler):
'C++ exception handling type.',
['none', 'a', 's', 'sc'],
'sc'),
- 'cpp_winlibs': coredata.UserStringArrayOption('cpp_winlibs',
- 'Windows libs to link against.',
- msvc_winlibs)
+ 'cpp_winlibs': coredata.UserArrayOption('cpp_winlibs',
+ 'Windows libs to link against.',
+ msvc_winlibs)
}
def get_option_compile_args(self, options):
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index 302c286..70a2d73 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -125,8 +125,7 @@ class UserComboOption(UserOption):
raise MesonException('Value %s not one of accepted values.' % value)
return value
-
-class UserStringArrayOption(UserOption):
+class UserArrayOption(UserOption):
def __init__(self, name, description, value, **kwargs):
super().__init__(name, description, kwargs.get('choices', []))
self.set_value(value, user_input=False)
diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py
index 568bdfc..efa26cf 100644
--- a/mesonbuild/mintro.py
+++ b/mesonbuild/mintro.py
@@ -139,7 +139,7 @@ def add_keys(optlist, options):
elif isinstance(opt, coredata.UserComboOption):
optdict['choices'] = opt.choices
typestr = 'combo'
- elif isinstance(opt, coredata.UserStringArrayOption):
+ elif isinstance(opt, coredata.UserArrayOption):
typestr = 'stringarray'
else:
raise RuntimeError("Unknown option type")
diff --git a/mesonbuild/optinterpreter.py b/mesonbuild/optinterpreter.py
index 3cca239..f8ccbe6 100644
--- a/mesonbuild/optinterpreter.py
+++ b/mesonbuild/optinterpreter.py
@@ -99,7 +99,7 @@ def string_array_parser(name, description, kwargs):
value = kwargs.get('value', [])
if not isinstance(value, list):
raise OptionException('Array choices must be passed as an array.')
- return coredata.UserStringArrayOption(name, description, value, choices=choices)
+ return coredata.UserArrayOption(name, description, value, choices=choices)
option_types = {'string': StringParser,
'boolean': BooleanParser,