2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 01:46:15 +01:00

eclipse: add possibility to add custom targets execution

Make it easy to add custom target executions in the automatic
eclipse configuration generation, for example to call other
standard waf targets from other tools or with specific options.
This commit is contained in:
Federico Pellegrin 2021-12-09 09:11:39 +01:00 committed by Thomas Nagy
parent 8dc07cc533
commit 41eb8ef35f
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',