diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-12-29 19:30:58 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-12-29 19:30:58 +0200 |
commit | 73042c79124f529eb8f08a25d2877b8ceebd4c22 (patch) | |
tree | fbd24b9eef77f400e4c5f499cfb316b4551a072c /mesonbuild/optinterpreter.py | |
parent | f85c348b948c9ecd9a5ec60d0c529b80e0c01a81 (diff) | |
download | meson-73042c79124f529eb8f08a25d2877b8ceebd4c22.zip meson-73042c79124f529eb8f08a25d2877b8ceebd4c22.tar.gz meson-73042c79124f529eb8f08a25d2877b8ceebd4c22.tar.bz2 |
Can set project options (but not global options) in subproject default options.
Diffstat (limited to 'mesonbuild/optinterpreter.py')
-rw-r--r-- | mesonbuild/optinterpreter.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mesonbuild/optinterpreter.py b/mesonbuild/optinterpreter.py index 81f3177..2ba7b99 100644 --- a/mesonbuild/optinterpreter.py +++ b/mesonbuild/optinterpreter.py @@ -71,8 +71,15 @@ class OptionInterpreter: def __init__(self, subproject, command_line_options): self.options = {} self.subproject = subproject + self.sbprefix = subproject + ':' self.cmd_line_options = {} for o in command_line_options: + if self.subproject != '': # Strip the beginning. + if not o.startswith(self.sbprefix): + continue + else: + if ':' in o: + continue try: (key, value) = o.split('=', 1) except ValueError: |