From 4da38e50a096e9aa19a75149bcc9dbb6e1de901e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 6 Mar 2017 10:29:00 +0200 Subject: Iterate over group members in test rule only if resolvable --- build2/dist/rule.cxx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'build2/dist') diff --git a/build2/dist/rule.cxx b/build2/dist/rule.cxx index bf5ab47..205c321 100644 --- a/build2/dist/rule.cxx +++ b/build2/dist/rule.cxx @@ -26,23 +26,16 @@ namespace build2 { const dir_path& out_root (t.root_scope ().out_path ()); - auto r (group_prerequisite_members (a, t, false)); - for (auto i (r.begin ()); i != r.end (); ++i) + // If we can, go inside see-through groups. + // + for (prerequisite_member p: + group_prerequisite_members (a, t, members_mode::maybe)) { - prerequisite_member p (*i); - // Skip prerequisites imported from other projects. // if (p.proj ()) continue; - // If we can, go inside see-through groups. Note that here we are - // not going into ad hoc groups but maybe we should (which would - // have to be done after match()). - // - if (p.type ().see_through && i.enter_group ()) - continue; - const target& pt (p.search ()); // Don't match targets that are outside of our project. -- cgit v1.1