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:
parent
42b181b652
commit
1901cb6c7f
@ -167,6 +167,7 @@ class ap_library_check_headers(Task.Task):
|
|||||||
def scan(self):
|
def scan(self):
|
||||||
r = []
|
r = []
|
||||||
self.headers = []
|
self.headers = []
|
||||||
|
|
||||||
srcnode_path = self.generator.bld.srcnode.abspath()
|
srcnode_path = self.generator.bld.srcnode.abspath()
|
||||||
|
|
||||||
# force dependency scan, if necessary
|
# force dependency scan, if necessary
|
||||||
@ -198,6 +199,9 @@ def ap_library_register_for_check(self):
|
|||||||
if not hasattr(self, 'compiled_tasks'):
|
if not hasattr(self, 'compiled_tasks'):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if self.env.DISABLE_HEADER_CHECKS:
|
||||||
|
return
|
||||||
|
|
||||||
for t in self.compiled_tasks:
|
for t in self.compiled_tasks:
|
||||||
tsk = self.create_task('ap_library_check_headers')
|
tsk = self.create_task('ap_library_check_headers')
|
||||||
tsk.compiled_task = t
|
tsk.compiled_task = t
|
||||||
|
10
wscript
10
wscript
@ -108,6 +108,10 @@ order to save typing.
|
|||||||
default=False,
|
default=False,
|
||||||
help="Disable compilation and test execution")
|
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',
|
g.add_option('--static',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=False,
|
default=False,
|
||||||
@ -205,6 +209,12 @@ def configure(cfg):
|
|||||||
cfg.msg('Setting rsync destination to', cfg.options.rsync_dest)
|
cfg.msg('Setting rsync destination to', cfg.options.rsync_dest)
|
||||||
cfg.env.RSYNC_DEST = 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
|
# TODO: Investigate if code could be changed to not depend on the
|
||||||
# source absolute path.
|
# source absolute path.
|
||||||
cfg.env.prepend_value('DEFINES', [
|
cfg.env.prepend_value('DEFINES', [
|
||||||
|
Loading…
Reference in New Issue
Block a user