Skip to content

Commit

Permalink
Get builtin options by correct name in subprojects.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpakkane committed Jun 30, 2015
1 parent 6f76c45 commit ac127db
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
14 changes: 14 additions & 0 deletions coredata.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@

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.
Expand Down
2 changes: 1 addition & 1 deletion interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ def func_get_option(self, nodes, args, kwargs):
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)
Expand Down
15 changes: 1 addition & 14 deletions optinterpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,7 @@
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
Expand Down

0 comments on commit ac127db

Please sign in to comment.