From 1901cb6c7ff4f455c6523b28c0ec7b06dcb87414 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 6 Aug 2017 19:24:04 +1000 Subject: [PATCH] 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 --- Tools/ardupilotwaf/ap_library.py | 4 ++++ wscript | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/Tools/ardupilotwaf/ap_library.py b/Tools/ardupilotwaf/ap_library.py index 3d90f49614d2b..f943ccb7574c7 100644 --- a/Tools/ardupilotwaf/ap_library.py +++ b/Tools/ardupilotwaf/ap_library.py @@ -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 @@ -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 diff --git a/wscript b/wscript index c07f44f41df7f..9f6c1f0ef9aa4 100644 --- a/wscript +++ b/wscript @@ -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', [