aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-12-09 20:43:40 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2013-12-09 20:43:40 +0200
commit9cde4e4012e5a02987bf2b2ac0f06d0c27ff2e7b (patch)
treeb2ff7800559fb7b1cc3c9ffe9ed30e0e77a4095c
parente21e7091e73694ded98d8230604f264b11fcba47 (diff)
downloadmeson-9cde4e4012e5a02987bf2b2ac0f06d0c27ff2e7b.zip
meson-9cde4e4012e5a02987bf2b2ac0f06d0c27ff2e7b.tar.gz
meson-9cde4e4012e5a02987bf2b2ac0f06d0c27ff2e7b.tar.bz2
Prevent global flags from being set in subprojects.
-rw-r--r--interpreter.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/interpreter.py b/interpreter.py
index e5348ec..3ce1feb 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -1004,6 +1004,8 @@ class Interpreter():
for a in args:
if not isinstance(a, str):
raise InvalidArguments('Argument %s is not a string.' % str(a))
+ if self.subproject != '':
+ raise InvalidCode('Global flags can not be set in subprojects because there is no way to make that reliable.')
if self.global_flags_frozen:
raise InvalidCode('Tried to set global flags after they have become immutable.')
if not 'language' in kwargs: