From 7f9fda79a0e96bbeeaee4e6b05f9ae5e1738d88a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 16 Mar 2016 16:21:07 +0200 Subject: Change prerequisite cleaning "limit" from subdirectories to same project One day we will get this right. --- build2/cxx/compile.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'build2/cxx/compile.cxx') diff --git a/build2/cxx/compile.cxx b/build2/cxx/compile.cxx index b07019d..df2b798 100644 --- a/build2/cxx/compile.cxx +++ b/build2/cxx/compile.cxx @@ -81,8 +81,10 @@ namespace build2 // code (below) takes care of the ones it is adding. // // When cleaning, ignore prerequisites that are not in the same - // or a subdirectory of ours. + // or a subdirectory of our project root. // + scope& rs (t.root_scope ()); + link::search_paths_cache lib_paths; // Extract lazily. for (prerequisite_member p: group_prerequisite_members (a, t)) @@ -115,7 +117,7 @@ namespace build2 target& pt (p.search ()); - if (a.operation () == clean_id && !pt.dir.sub (t.dir)) + if (a.operation () == clean_id && !pt.dir.sub (rs.out_path ())) continue; build2::match (a, pt); @@ -128,7 +130,6 @@ namespace build2 // if (a == perform_update_id) { - scope& rs (t.root_scope ()); const string& sys (as (*rs["cxx.target.system"])); // The cached prerequisite target should be the same as what is in -- cgit v1.1