diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-10-16 21:23:29 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-10-16 21:23:29 +0300 |
commit | 0da4537b6962d1cd51a05393f4b0cf250bea1ac4 (patch) | |
tree | ae21ef0467916d97a2990ee84b4f3b5880cfaece | |
parent | d5ce0c7cd967e2baba70986b763b1bf853a3806f (diff) | |
download | meson-0da4537b6962d1cd51a05393f4b0cf250bea1ac4.zip meson-0da4537b6962d1cd51a05393f4b0cf250bea1ac4.tar.gz meson-0da4537b6962d1cd51a05393f4b0cf250bea1ac4.tar.bz2 |
Preserve option function for option files.
-rw-r--r-- | interpreter.py | 4 | ||||
-rw-r--r-- | test cases/failing/5 misplaced option/meson.build | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/interpreter.py b/interpreter.py index bd5b815..4dd51a7 100644 --- a/interpreter.py +++ b/interpreter.py @@ -579,6 +579,7 @@ class Interpreter(): 'configuration_data' : self.func_configuration_data, 'run_command' : self.func_run_command, 'gettext' : self.func_gettext, + 'option' : self.func_option, } def get_build_def_files(self): @@ -693,6 +694,9 @@ class Interpreter(): raise InterpreterException('More than one gettext definitions currently not supported.') self.build.pot.append((packagename, languages, self.subdir)) + def func_option(self, nodes, args, kwargs): + raise InterpreterException('Tried to call option() in build description file. All options must be in the option file.') + def func_configuration_data(self, node, args, kwargs): if len(args) != 0: raise InterpreterException('configuration_data takes no arguments') diff --git a/test cases/failing/5 misplaced option/meson.build b/test cases/failing/5 misplaced option/meson.build new file mode 100644 index 0000000..883de0f --- /dev/null +++ b/test cases/failing/5 misplaced option/meson.build @@ -0,0 +1,3 @@ +project('misplaced option', 'c') + +option('dummy', type : 'string') |