From 7d61f6fbbe0561f371436a74d4651abdbdde47df Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 11 Sep 2015 16:38:39 +0200 Subject: Check amalgamation itself when searching for imported project --- build/file.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'build') diff --git a/build/file.cxx b/build/file.cxx index 3a8a5d0..278cd5d 100644 --- a/build/file.cxx +++ b/build/file.cxx @@ -743,13 +743,22 @@ namespace build // Figure out this project's out_root. // dir_path out_root; - dir_path fallback_src_root; // We have seen this already, havent' we ? + dir_path fallback_src_root; // We have seen this already, haven't we..? // First search subprojects, starting with our root and then trying // outer roots for as long as we are inside an amalgamation. // for (scope* r (&iroot);; r = r->parent_scope ()->root_scope ()) { + // First check the amalgamation itself. + // + if (r != &iroot && as (*r->vars["project"]) == project) + { + out_root = r->out_path (); + fallback_src_root = r->src_path (); + break; + } + if (auto l = r->vars["subprojects"]) { const auto& m (as (*l)); -- cgit v1.1