diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-06-14 13:06:38 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-06-14 13:06:38 +0200 |
commit | 57abb0703ec640fdcd0b0ac165f742bbc34df533 (patch) | |
tree | ec0fc9b3f23b2ed34e354978788384ee08be8035 /build2/algorithm.cxx | |
parent | 700f2e7c4be9c8caa0ac0fcd58b1a0ce505e33fa (diff) |
Next installment in C++ modules saga: module search, re-export support
Diffstat (limited to 'build2/algorithm.cxx')
-rw-r--r-- | build2/algorithm.cxx | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/build2/algorithm.cxx b/build2/algorithm.cxx index 658a6cd..9310644 100644 --- a/build2/algorithm.cxx +++ b/build2/algorithm.cxx @@ -1089,20 +1089,26 @@ namespace build2 pair<optional<target_state>, const target*> execute_prerequisites (const target_type* tt, action a, const target& t, - const timestamp& mt, const prerequisite_filter& pf) + const timestamp& mt, const prerequisite_filter& pf, + size_t n) { assert (current_mode == execution_mode::first); auto& pts (const_cast<target&> (t).prerequisite_targets); // MT-aware. + if (n == 0) + n = pts.size (); + // Pretty much as straight_execute_members() but hairier. // target_state rs (target_state::unchanged); wait_guard wg (target::count_busy (), t.task_count); - for (const target*& pt : pts) + for (size_t i (0); i != n; ++i) { + const target*& pt (pts[i]); + if (pt == nullptr) // Skipped. continue; @@ -1124,8 +1130,10 @@ namespace build2 bool e (mt == timestamp_nonexistent); const target* rt (tt != nullptr ? nullptr : &t); - for (const target*& pt : pts) + for (size_t i (0); i != n; ++i) { + const target*& pt (pts[i]); + if (pt == nullptr) continue; |