From 689902cb697f3d07b0c955c63485a183f6116656 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 1 Sep 2020 14:09:42 +1000 Subject: [PATCH] waf: moved include of ap_config.h into configure step --- Tools/ardupilotwaf/ardupilotwaf.py | 1 - wscript | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Tools/ardupilotwaf/ardupilotwaf.py b/Tools/ardupilotwaf/ardupilotwaf.py index ebef10c695..7672c04f41 100644 --- a/Tools/ardupilotwaf/ardupilotwaf.py +++ b/Tools/ardupilotwaf/ardupilotwaf.py @@ -247,7 +247,6 @@ def ap_program(bld, if use_legacy_defines: kw['defines'].extend(get_legacy_defines(bld.path.name)) - kw['cxxflags'] = kw.get('cxxflags', []) + ['-include', 'ap_config.h'] kw['features'] = kw.get('features', []) + bld.env.AP_PROGRAM_FEATURES program_groups = Utils.to_list(program_groups) diff --git a/wscript b/wscript index 7812ed6f58..0f92a04ddc 100644 --- a/wscript +++ b/wscript @@ -364,6 +364,9 @@ def configure(cfg): cfg.write_config_header(os.path.join(cfg.variant, 'ap_config.h')) + # add in generated flags + cfg.env.CXXFLAGS += ['-include', 'ap_config.h'] + _collect_autoconfig_files(cfg) def collect_dirs_to_recurse(bld, globs, **kw):