Automatically add the visualizer module to programs running with waf --run --vis

This commit is contained in:
Gustavo J. A. M. Carneiro
2012-06-06 18:42:13 +01:00
parent cfa7c17fa4
commit 35ed8aeb91

View File

@@ -823,6 +823,9 @@ def build(bld):
# nothing more; this greatly speeds up compilation when all you
# want to do is run a test program.
Options.options.targets += ',' + os.path.basename(program_name)
if getattr(Options.options, "visualize", False):
program_obj = wutils.find_program(program_name, bld.env)
program_obj.use.append('ns3-visualizer')
for gen in bld.all_task_gen:
if type(gen).__name__ in ['ns3header_taskgen', 'ns3moduleheader_taskgen']:
gen.post()