From 6e726eb11d3e21be410549d27dd1aa94678f3d09 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 16 Sep 2018 16:11:43 +0200 Subject: Add support for suppressing warnings from system libraries --- extras/autowaf.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'extras') diff --git a/extras/autowaf.py b/extras/autowaf.py index be3bfe2..8f9c633 100644 --- a/extras/autowaf.py +++ b/extras/autowaf.py @@ -180,6 +180,16 @@ def check_pkg(conf, name, **args): else: conf.env[var_name] = CheckType.OPTIONAL + if not conf.env.MSVC_COMPILER and 'system' in args and args['system']: + includes = conf.env['INCLUDES_' + nameify(args['uselib_store'])] + for path in includes: + if 'COMPILER_CC' in conf.env: + conf.env.append_value('CFLAGS', ['-isystem', path]) + if 'COMPILER_CXX' in conf.env: + conf.env.append_value('CXXFLAGS', ['-isystem', path]) + + conf.env.append_value('CXXFLAGS', ['-isystem', '/usr/local/include']) + def normpath(path): if sys.platform == 'win32': return os.path.normpath(path).replace('\\', '/') -- cgit v1.2.1