aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-06-30 20:43:05 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-06-30 20:43:05 +0300
commitac127db9194616298bb80134a2bda6e0858a0e15 (patch)
treeb6f550f0da007314ac2bdce31320b38a158af820
parent6f76c45a542d4515c7b850a9878fc8030cd273de (diff)
downloadmeson-ac127db9194616298bb80134a2bda6e0858a0e15.zip
meson-ac127db9194616298bb80134a2bda6e0858a0e15.tar.gz
meson-ac127db9194616298bb80134a2bda6e0858a0e15.tar.bz2
Get builtin options by correct name in subprojects.
-rw-r--r--coredata.py14
-rw-r--r--interpreter.py2
-rw-r--r--optinterpreter.py15
3 files changed, 16 insertions, 15 deletions
diff --git a/coredata.py b/coredata.py
index 4590550..e3d4868 100644
--- a/coredata.py
+++ b/coredata.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.
diff --git a/interpreter.py b/interpreter.py
index 026c7ff..4bd7c6f 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -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)
diff --git a/optinterpreter.py b/optinterpreter.py
index 1fbb6fc..6906d31 100644
--- a/optinterpreter.py
+++ b/optinterpreter.py
@@ -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