diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-04-15 19:57:46 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-04-19 16:13:25 +0300 |
commit | 4588b910960c24fd61679124b6fd737c90e14c46 (patch) | |
tree | 1f2f375c733d13a0efee29997f8820125a04080f /mesonbuild | |
parent | 713ea6aa2ffe65b67d87edc78dc77aeb3f48f6c2 (diff) | |
download | meson-4588b910960c24fd61679124b6fd737c90e14c46.zip meson-4588b910960c24fd61679124b6fd737c90e14c46.tar.gz meson-4588b910960c24fd61679124b6fd737c90e14c46.tar.bz2 |
Print a warning on duplicated keywords.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/mparser.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/mparser.py b/mesonbuild/mparser.py index a9f25b1..de0f12c 100644 --- a/mesonbuild/mparser.py +++ b/mesonbuild/mparser.py @@ -14,6 +14,7 @@ import re from .mesonlib import MesonException +from . import mlog class ParseException(MesonException): def __init__(self, text, line, lineno, colno): @@ -366,6 +367,8 @@ class ArgumentNode: self.arguments += [statement] def set_kwarg(self, name, value): + if name in self.kwargs: + mlog.warning('Keyword argument "%s" defined multiple times. This will be a an error in future Meson releases.' % name) self.kwargs[name] = value def num_args(self): |