waf: added --disable-header-checks

the headers checks are most of the re-build time when editing class
headers. Disabling them makes development much faster
This commit is contained in:
Andrew Tridgell 2017-08-06 19:24:04 +10:00 committed by Lucas De Marchi
parent 42b181b652
commit 1901cb6c7f
2 changed files with 14 additions and 0 deletions

View File

@ -167,6 +167,7 @@ class ap_library_check_headers(Task.Task):
def scan(self):
r = []
self.headers = []
srcnode_path = self.generator.bld.srcnode.abspath()
# force dependency scan, if necessary
@ -198,6 +199,9 @@ def ap_library_register_for_check(self):
if not hasattr(self, 'compiled_tasks'):
return
if self.env.DISABLE_HEADER_CHECKS:
return
for t in self.compiled_tasks:
tsk = self.create_task('ap_library_check_headers')
tsk.compiled_task = t

10
wscript
View File

@ -108,6 +108,10 @@ order to save typing.
default=False,
help="Disable compilation and test execution")
g.add_option('--disable-header-checks', action='store_true',
default=False,
help="Disable checking of headers")
g.add_option('--static',
action='store_true',
default=False,
@ -205,6 +209,12 @@ def configure(cfg):
cfg.msg('Setting rsync destination to', cfg.options.rsync_dest)
cfg.env.RSYNC_DEST = cfg.options.rsync_dest
if cfg.options.disable_header_checks:
cfg.msg('Disabling header checks', cfg.options.disable_header_checks)
cfg.env.DISABLE_HEADER_CHECKS = True
else:
cfg.env.DISABLE_HEADER_CHECKS = False
# TODO: Investigate if code could be changed to not depend on the
# source absolute path.
cfg.env.prepend_value('DEFINES', [