diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-11 16:38:39 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-09-11 16:38:39 +0200 |
commit | 7d61f6fbbe0561f371436a74d4651abdbdde47df (patch) | |
tree | a97b241fccea3805e176c86517dd599970b57ecf | |
parent | db6f5f55f1f0130bba814c494001cbadb138f53f (diff) |
Check amalgamation itself when searching for imported project
-rw-r--r-- | build/file.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
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<string> (*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<subprojects> (*l)); |