Preserve option function for option files.

pull/15/head
Jussi Pakkanen 11 years ago
parent d5ce0c7cd9
commit 0da4537b69
  1. 4
      interpreter.py
  2. 3
      test cases/failing/5 misplaced option/meson.build

@ -579,6 +579,7 @@ class Interpreter():
'configuration_data' : self.func_configuration_data, 'configuration_data' : self.func_configuration_data,
'run_command' : self.func_run_command, 'run_command' : self.func_run_command,
'gettext' : self.func_gettext, 'gettext' : self.func_gettext,
'option' : self.func_option,
} }
def get_build_def_files(self): def get_build_def_files(self):
@ -693,6 +694,9 @@ class Interpreter():
raise InterpreterException('More than one gettext definitions currently not supported.') raise InterpreterException('More than one gettext definitions currently not supported.')
self.build.pot.append((packagename, languages, self.subdir)) 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): def func_configuration_data(self, node, args, kwargs):
if len(args) != 0: if len(args) != 0:
raise InterpreterException('configuration_data takes no arguments') raise InterpreterException('configuration_data takes no arguments')

@ -0,0 +1,3 @@
project('misplaced option', 'c')
option('dummy', type : 'string')
Loading…
Cancel
Save