waf: moved include of ap_config.h into configure step

This commit is contained in:
Andrew Tridgell 2020-09-01 14:09:42 +10:00
parent d905282c1e
commit 689902cb69
2 changed files with 3 additions and 1 deletions

View File

@ -247,7 +247,6 @@ def ap_program(bld,
if use_legacy_defines: if use_legacy_defines:
kw['defines'].extend(get_legacy_defines(bld.path.name)) 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 kw['features'] = kw.get('features', []) + bld.env.AP_PROGRAM_FEATURES
program_groups = Utils.to_list(program_groups) program_groups = Utils.to_list(program_groups)

View File

@ -364,6 +364,9 @@ def configure(cfg):
cfg.write_config_header(os.path.join(cfg.variant, 'ap_config.h')) 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) _collect_autoconfig_files(cfg)
def collect_dirs_to_recurse(bld, globs, **kw): def collect_dirs_to_recurse(bld, globs, **kw):