Skip to content

Commit

Permalink
waf: added --disable-header-checks
Browse files Browse the repository at this point in the history
the headers checks are most of the re-build time when editing class
headers. Disabling them makes development much faster
  • Loading branch information
tridge authored and lucasdemarchi committed Aug 8, 2017
1 parent 42b181b commit 1901cb6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tools/ardupilotwaf/ap_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ def signature(self):
def scan(self):
r = []
self.headers = []

srcnode_path = self.generator.bld.srcnode.abspath()

# force dependency scan, if necessary
Expand Down Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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', [
Expand Down

0 comments on commit 1901cb6

Please sign in to comment.