Get builtin options by correct name in subprojects.

pull/190/head
Jussi Pakkanen 10 years ago
parent 6f76c45a54
commit ac127db919
  1. 14
      coredata.py
  2. 2
      interpreter.py
  3. 15
      optinterpreter.py

@ -16,6 +16,20 @@ import pickle, os, uuid
version = '0.25.0-research'
builtin_options = {'buildtype': True,
'strip': True,
'coverage': True,
'pch': True,
'unity': True,
'prefix': True,
'libdir' : True,
'bindir' : True,
'includedir' : True,
'datadir' : True,
'mandir' : True,
'localedir' : True,
'werror' : True,
}
# This class contains all data that must persist over multiple
# invocations of Meson. It is roughly the same thing as
# cmakecache.

@ -1130,7 +1130,7 @@ class Interpreter():
if len(args) != 1:
raise InterpreterException('Argument required for get_option.')
optname = args[0]
if self.is_subproject():
if optname not in coredata.builtin_options and self.is_subproject():
optname = self.subproject + ':' + optname
try:
return self.environment.get_coredata().get_builtin_option(optname)

@ -16,20 +16,7 @@ import mparser
import coredata
import os, re
forbidden_option_names = {'buildtype': True,
'strip': True,
'coverage': True,
'pch': True,
'unity': True,
'prefix': True,
'libdir' : True,
'bindir' : True,
'includedir' : True,
'datadir' : True,
'mandir' : True,
'localedir' : True,
'werror' : True,
}
forbidden_option_names = coredata.builtin_options
class OptionException(coredata.MesonException):
pass

Loading…
Cancel
Save