mirror of https://github.com/ArduPilot/ardupilot
waf: make options groups accessible for any tool
That allows options being declared where they're really used. Additionally, we load ardupilotwaf after the other tools so that we can create our groups after all non-ardupilot option groups are created. That makes our groups appear as the last ones in the help message, which makes it easier to locate them.
This commit is contained in:
parent
fd88e39408
commit
8c4d4f3f2a
|
@ -307,7 +307,7 @@ def _select_programs_from_group(bld):
|
|||
bld.targets += ',' + tg.name
|
||||
|
||||
def options(opt):
|
||||
g = opt.add_option_group('Ardupilot build options')
|
||||
g = opt.ap_groups['build']
|
||||
g.add_option('--program-group',
|
||||
action='append',
|
||||
default=[],
|
||||
|
|
13
wscript
13
wscript
|
@ -39,10 +39,17 @@ def init(ctx):
|
|||
c.variant = env.BOARD
|
||||
|
||||
def options(opt):
|
||||
opt.load('ardupilotwaf')
|
||||
opt.load('compiler_cxx compiler_c waf_unit_test python')
|
||||
|
||||
g = opt.add_option_group('Ardupilot configure options')
|
||||
opt.ap_groups = {
|
||||
'configure': opt.add_option_group('Ardupilot configure options'),
|
||||
'build': opt.add_option_group('Ardupilot build options'),
|
||||
'check': opt.add_option_group('Ardupilot check options'),
|
||||
}
|
||||
|
||||
opt.load('ardupilotwaf')
|
||||
|
||||
g = opt.ap_groups['configure']
|
||||
boards_names = boards.get_boards_names()
|
||||
g.add_option('--board',
|
||||
action='store',
|
||||
|
@ -50,7 +57,7 @@ def options(opt):
|
|||
default='sitl',
|
||||
help='Target board to build, choices are %s' % boards_names)
|
||||
|
||||
g = opt.add_option_group('Ardupilot check options')
|
||||
g = opt.ap_groups['check']
|
||||
g.add_option('--check-verbose',
|
||||
action='store_true',
|
||||
help='Output all test programs')
|
||||
|
|
Loading…
Reference in New Issue