From 5cefca444f7062c61cc9d118ffea5901e05186fd Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 8 Feb 2017 07:42:41 +0200 Subject: Implement parallel operation execution --- build2/bin/rule.cxx | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'build2/bin') diff --git a/build2/bin/rule.cxx b/build2/bin/rule.cxx index 9adb692..ea84971 100644 --- a/build2/bin/rule.cxx +++ b/build2/bin/rule.cxx @@ -134,21 +134,8 @@ namespace build2 bool a (type == "static" || type == "both"); bool s (type == "shared" || type == "both"); - target* m1 (a ? t.a : nullptr); - target* m2 (s ? t.s : nullptr); - - if (current_mode == execution_mode::last) - swap (m1, m2); - - target_state r (target_state::unchanged); - - if (m1 != nullptr) - r |= execute (act, *m1); - - if (m2 != nullptr) - r |= execute (act, *m2); - - return r; + const target* m[] = {a ? t.a : nullptr, s ? t.s : nullptr}; + return execute_members (act, t, m); } } } -- cgit v1.1