diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2018-04-26 22:18:46 -0400 |
---|---|---|
committer | Xavier Claessens <xavier.claessens@collabora.com> | 2018-04-27 11:09:14 -0400 |
commit | 570c108635ca4b895330a6794061014c278886f8 (patch) | |
tree | 74a339e66c5dbc24abec00fac9983b8073dd35f4 /mesonbuild/mesonmain.py | |
parent | cb5ad2f2114519e4009f7ee6fcab3ad40d971de2 (diff) | |
download | meson-570c108635ca4b895330a6794061014c278886f8.zip meson-570c108635ca4b895330a6794061014c278886f8.tar.gz meson-570c108635ca4b895330a6794061014c278886f8.tar.bz2 |
Fix --warnlevel being renamed to --warning-level in latest release
Diffstat (limited to 'mesonbuild/mesonmain.py')
-rw-r--r-- | mesonbuild/mesonmain.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index cae59b4..c4a4d2a 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -57,11 +57,12 @@ def filter_builtin_options(args, original_args): if meson_opts: for arg in meson_opts: value = arguments[arg] - if any([a.startswith('--{}'.format(arg)) for a in original_args]): + cmdline_name = coredata.get_builtin_option_cmdline_name(arg) + if any([a.startswith(cmdline_name) for a in original_args]): raise MesonException( - 'Argument "{0}" passed as both --{0} and -D{0}, but only ' - 'one is allowed'.format(arg)) - setattr(args, coredata.get_builtin_option_destination(arg), value) + 'Argument "{0}" passed as both {1} and -D{0}, but only ' + 'one is allowed'.format(arg, cmdline_name)) + setattr(args, arg, value) # Remove the builtin option from the project args values args.projectoptions.remove('{}={}'.format(arg, value)) |