aboutsummaryrefslogtreecommitdiff
path: root/build2/bin
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-02-08 07:42:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-02-13 12:42:42 +0200
commit5cefca444f7062c61cc9d118ffea5901e05186fd (patch)
tree879d608f9a9084c7eaa4e5cb8bcad5650d966730 /build2/bin
parentdb2a696f810e41189bcdf5524696ff3d0cfbe5a9 (diff)
Implement parallel operation execution
Diffstat (limited to 'build2/bin')
-rw-r--r--build2/bin/rule.cxx17
1 files changed, 2 insertions, 15 deletions
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);
}
}
}