diff --git a/authors.txt b/authors.txt index 72606e901..2f36256cc 100644 --- a/authors.txt +++ b/authors.txt @@ -62,3 +62,4 @@ Matthieu Gautier Kseniia Vasilchuk Philipp Geier Mike Sinkovsky +Dima Krasner diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 007a7d516..4466f2250 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -1576,9 +1576,10 @@ class Interpreter(InterpreterBase): @stringArgs def func_project(self, node, args, kwargs): - if self.environment.first_invocation and ('default_options' in kwargs or + default_options = kwargs.get('default_options', []) + if self.environment.first_invocation and (len(default_options) > 0 or len(self.default_project_options) > 0): - self.parse_default_options(kwargs['default_options']) + self.parse_default_options(default_options) if not self.is_subproject(): self.build.project_name = args[0] if os.path.exists(self.option_file): diff --git a/test cases/common/95 dep fallback/meson.build b/test cases/common/95 dep fallback/meson.build index 212c64f69..9358d296e 100644 --- a/test cases/common/95 dep fallback/meson.build +++ b/test cases/common/95 dep fallback/meson.build @@ -1,6 +1,7 @@ project('dep fallback', 'c') -bob = dependency('boblib', fallback : ['boblib', 'bob_dep'], required: false) +bob = dependency('boblib', fallback : ['boblib', 'bob_dep'], required: false, + default_options : 'warning_level=1') if not bob.found() error('Bob is actually needed') endif