From 1233022c78ca9ca1de78c6c1efc1fb8075cce635 Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Fri, 26 Feb 2016 21:02:21 +0000 Subject: [PATCH] waf: cmake: synchronize cmake build tasks of same configuration Running cmake build tasks of the same configuration in parallel my cause race condition. --- Tools/ardupilotwaf/cmake.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tools/ardupilotwaf/cmake.py b/Tools/ardupilotwaf/cmake.py index 5296578fcd..a10ea1d2c3 100644 --- a/Tools/ardupilotwaf/cmake.py +++ b/Tools/ardupilotwaf/cmake.py @@ -177,6 +177,8 @@ def process_cmake_configure(self): self.cmake_bld = self.bld.bldnode.make_node(self.cmake_bld) self.cmake_bld.mkdir() + self.last_build_task = None + self.cmake_vars = getattr(self, 'cmake_vars', {}) # NOTE: we'll probably need to use the full class name in waf 1.9 @@ -210,6 +212,10 @@ def process_cmake_build(self): tsk.env.CMAKE_TARGET = self.cmake_target tsk.set_run_after(self.config_taskgen.cmake_config_task) + if self.config_taskgen.last_build_task: + tsk.set_run_after(self.config_taskgen.last_build_task) + self.config_taskgen.last_build_task = tsk + outputs = Utils.to_list(getattr(self, 'target', '')) for o in outputs: if not isinstance(o, Node.Node):