2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-25 11:19:52 +01:00

swig: c(xx) task inherits weight from swig itself

If any weights (i.e. `weight` or `tree_weight`) are set on a swig task
then those weights are passed on to the task created to compile the
wrapper generated by swig.
This commit is contained in:
Daniel Vollmer 2018-03-29 13:11:43 +02:00 committed by ita1024
parent c80722685c
commit a4b0b675cf

View File

@ -111,6 +111,13 @@ def swig_c(self):
c_tsk = self.generator.c_hook(out_node) c_tsk = self.generator.c_hook(out_node)
c_tsk.set_run_after(self) c_tsk.set_run_after(self)
# transfer weights from swig task to c task
if getattr(self, 'weight', None):
c_tsk.weight = self.weight
if getattr(self, 'tree_weight', None):
c_tsk.tree_weight = self.tree_weight
try: try:
self.more_tasks.append(c_tsk) self.more_tasks.append(c_tsk)
except AttributeError: except AttributeError: