diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-01-03 16:03:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-03 16:03:18 -0500 |
commit | 55cdba635e61b68658e0d209a58cfb2f1537df93 (patch) | |
tree | 03ce2b4ba4aace32f64f8c43478ba60366fdac72 /mesonbuild/optinterpreter.py | |
parent | 5ff97b0f357a79556667668e06914a50970f86d6 (diff) | |
parent | d94f64ded1382ff768ce2c2900a8e6efcf3a11fb (diff) | |
download | meson-55cdba635e61b68658e0d209a58cfb2f1537df93.tar.gz |
Merge pull request #1260 from mesonbuild/subproj_defaults
Can set subproject option defaults from command line and master project
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 ac23fe84c..089eb2cdf 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: |