Merge branch 'eclipse_extra_targets' into 'master'

eclipse: add possibility to add custom targets execution

See merge request ita1024/waf!2335
This commit is contained in:
Federico Pellegrin 2021-12-09 08:23:45 +00:00
commit 4f1e1bb4dd
2 changed files with 6 additions and 0 deletions

View File

@ -54,6 +54,7 @@ def options(opt):
def configure(conf):
conf.env.ECLIPSE_EXTRA_TARGETS = ['test', 'lint', 'foo --bar']
conf.load('eclipse')
# We recurse configurations in our submodules
conf.recurse(module_list)

View File

@ -10,6 +10,9 @@ Usage:
def options(opt):
opt.load('eclipse')
To add additional targets beside standard ones (configure, dist, install, check)
the environment ECLIPSE_EXTRA_TARGETS can be set (ie. to ['test', 'lint', 'docs'])
$ waf configure eclipse
"""
@ -400,6 +403,8 @@ class eclipse(Build.BuildContext):
addTargetWrap('dist', False)
addTargetWrap('install', False)
addTargetWrap('check', False)
for addTgt in getattr(self.env, 'ECLIPSE_EXTRA_TARGETS', []):
addTargetWrap(addTgt, False)
storageModule = self.add(doc, cproject, 'storageModule',
{'moduleId': 'cdtBuildSystem',