diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-22 15:31:57 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-22 15:31:57 +0200 |
commit | 50ccab4eedc499dd013fd449163f9c948d18244b (patch) | |
tree | b498e74fcf425944a858e1182f99daeb124c3fe1 | |
parent | 557269660c1d9796a7cf9e911efb9262f645e359 (diff) |
Add missing non-existent src_base diagnostics
-rw-r--r-- | build2/b.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/build2/b.cxx b/build2/b.cxx index 4a764e6..8d06a72 100644 --- a/build2/b.cxx +++ b/build2/b.cxx @@ -587,8 +587,21 @@ main (int argc, char* argv[]) // out. If src_base is still undetermined, calculate it. // if (src_base.empty ()) + { src_base = src_root / out_base.leaf (out_root); + if (!exists (src_base)) + { + diag_record dr; + dr << fail << "src_base directory " << src_base + << " does not exist"; + + if (guessing) + dr << info << "consider explicitly specifying src_base " + << "for " << tn; + } + } + // Check that out_root that we have found is the innermost root // for this project. If it is not, then it means we are trying // to load a disfigured sub-project and that we do not support. |