Skip to content

Commit

Permalink
waf: added 1 level recursive depedencies
Browse files Browse the repository at this point in the history
when using --enable-FEATURE also enable dependent feattures for 1
level
  • Loading branch information
tridge committed Nov 1, 2024
1 parent 610cc28 commit efc5335
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Tools/ardupilotwaf/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit efc5335

Please sign in to comment.