From 626a49c269351ab47ba8ab1847eae0d13fd62934 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 27 Jul 2019 21:48:21 +0200 Subject: Cleanup: Clean up includes and call IWYU in lint target --- wscript | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'wscript') diff --git a/wscript b/wscript index 6d44282..7fd5a3a 100644 --- a/wscript +++ b/wscript @@ -3,7 +3,7 @@ import os import sys -from waflib import Options, TaskGen +from waflib import Logs, Options, TaskGen from waflib.extras import autowaf # Library and package version (UNIX style major, minor, micro) @@ -127,7 +127,7 @@ def build(bld): common = { 'framework': framework, - 'includes': ['.', './src'], + 'includes': ['.'], 'uselib': ['CAIRO'], } @@ -229,6 +229,11 @@ def lint(ctx): subprocess.call(cmd, cwd='build', shell=True) + try: + subprocess.call(['iwyu_tool.py', '-o', 'clang', '-p', 'build']) + except Exception: + Logs.warn('Failed to call iwyu_tool.py') + # Alias .m files to be compiled like .c files, gcc will do the right thing. @TaskGen.extension('.m') def m_hook(self, node): -- cgit v1.2.1