From efc5335af101b9b4f0e049e7b8fcf0dbb814f9de Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 31 Oct 2024 20:37:34 +0900 Subject: [PATCH] waf: added 1 level recursive depedencies when using --enable-FEATURE also enable dependent feattures for 1 level --- Tools/ardupilotwaf/boards.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index 154ef72f8bcf4..c866422092cb2 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -167,6 +167,12 @@ def srcpath(path): disable_option = "disable_" + enable_option[len("enable-"):] if getattr(cfg.options, enable_option, False): env.CXXFLAGS += ['-D%s=1' % opt.define] + if opt.dependency: + for d in opt.dependency.split(','): + for opt2 in build_options.BUILD_OPTIONS: + if opt2.label == d: + cfg.msg("Enabled %s" % opt2.label, 'yes', color='GREEN') + env.CXXFLAGS += ['-D%s=1' % opt2.define] cfg.msg("Enabled %s" % opt.label, 'yes', color='GREEN') elif getattr(cfg.options, disable_option, False): env.CXXFLAGS += ['-D%s=0' % opt.define]