Skip to content

Commit

Permalink
need to put this in the waf tool as well
Browse files Browse the repository at this point in the history
  • Loading branch information
olsoni committed Oct 4, 2023
1 parent e6bbbb3 commit 9e9a48f
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions waftools/zcm-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,14 @@ def zcmgen(ctx, **kw):
if not getattr(ctx.env, 'ZCMGEN', []):
raise WafError('zcmgen requires ctx.env.ZCMGEN set to the zcm-gen executable')

uselib_name = kw.get('name', 'zcmtypes')
building = kw.get('build', True)
pkgPrefix = kw.get('pkgPrefix', '')
littleEndian = kw.get('littleEndian', False)
javapkg = kw.get('javapkg', 'zcmtypes')
juliapkg = kw.get('juliapkg', '')
juliagenpkgs = kw.get('juliagenpkgs', False)
uselib_name = kw.get('name', 'zcmtypes')
building = kw.get('build', True)
pkgPrefix = kw.get('pkgPrefix', '')
littleEndian = kw.get('littleEndian', False)
cppVirtualDtor = kw.get('cppVirtualDtor', True)
javapkg = kw.get('javapkg', 'zcmtypes')
juliapkg = kw.get('juliapkg', '')
juliagenpkgs = kw.get('juliagenpkgs', False)

lang = kw.get('lang', [])
if isinstance(lang, str):
Expand Down Expand Up @@ -249,13 +250,14 @@ def zcmgen(ctx, **kw):

# Add .zcm files to build so the process_zcmtypes rule picks them up
genfiles_name = uselib_name + '_genfiles'
tg = ctx(name = genfiles_name,
source = kw['source'],
lang = lang,
pkgPrefix = pkgPrefix,
littleEndian = littleEndian,
juliapkg = juliapkg,
javapkg = javapkg)
tg = ctx(name = genfiles_name,
source = kw['source'],
lang = lang,
pkgPrefix = pkgPrefix,
littleEndian = littleEndian,
cppVirtualDtor = cppVirtualDtor,
juliapkg = juliapkg,
javapkg = javapkg)
for s in tg.source:
ctx.add_manual_dependency(s, zcmgen)

Expand Down Expand Up @@ -379,6 +381,9 @@ def run(self):
(bld, bld, inc)
if 'cpp' in gen.lang:
cmd['cpp'] = '--cpp --cpp-hpath %s --cpp-include %s' % (bld, inc)
if not gen.cppVirtualDtor:
cmd['cpp'] += ' --cpp-virtual-destructor=false'

if 'java' in gen.lang:
cmd['java'] = '--java --jpath %s --jpkgprefix %s' % (bld + '/java', gen.javapkg)
if 'python' in gen.lang:
Expand Down

0 comments on commit 9e9a48f

Please sign in to comment.