aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/optinterpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-12-29 19:30:58 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2016-12-29 19:30:58 +0200
commit73042c79124f529eb8f08a25d2877b8ceebd4c22 (patch)
treefbd24b9eef77f400e4c5f499cfb316b4551a072c /mesonbuild/optinterpreter.py
parentf85c348b948c9ecd9a5ec60d0c529b80e0c01a81 (diff)
downloadmeson-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.py7
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: