aboutsummaryrefslogtreecommitdiff
path: root/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-01-02 21:34:39 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2016-01-02 21:34:39 +0200
commit4c041e2aec22f007b79a314d6f0472a1bc9bae2f (patch)
treec004a878cf825d2408382821f2f195158294fd8a /interpreter.py
parentedaf663ee2e7dfc01af3cace2f83a3fca7ef94d3 (diff)
downloadmeson-4c041e2aec22f007b79a314d6f0472a1bc9bae2f.zip
meson-4c041e2aec22f007b79a314d6f0472a1bc9bae2f.tar.gz
meson-4c041e2aec22f007b79a314d6f0472a1bc9bae2f.tar.bz2
Can tag include directories as system dirs to reduce compiler warning noise. Closes #345.
Diffstat (limited to 'interpreter.py')
-rw-r--r--interpreter.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/interpreter.py b/interpreter.py
index a03c0bb..5a8b5e5 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -475,7 +475,7 @@ class BuildTargetHolder(InterpreterObject):
return self.held_object.is_cross()
def private_dir_include_method(self, args, kwargs):
- return IncludeDirsHolder(build.IncludeDirs('', [],
+ return IncludeDirsHolder(build.IncludeDirs('', [], False,
[self.interpreter.backend.get_target_private_dir(self.held_object)]))
def outdir_method(self, args, kwargs):
@@ -1821,14 +1821,16 @@ class Interpreter():
return mesonlib.File.from_built_file(self.subdir, output)
@stringArgs
- @noKwargs
def func_include_directories(self, node, args, kwargs):
absbase = os.path.join(self.environment.get_source_dir(), self.subdir)
for a in args:
absdir = os.path.join(absbase, a)
if not os.path.isdir(absdir):
raise InvalidArguments('Include dir %s does not exist.' % a)
- i = IncludeDirsHolder(build.IncludeDirs(self.subdir, args))
+ is_system = kwargs.get('is_system', False)
+ if not isinstance(is_system, bool):
+ raise InvalidArguments('Is_system must be boolean.')
+ i = IncludeDirsHolder(build.IncludeDirs(self.subdir, args, is_system))
return i
@stringArgs