From bf83fe0158f17a9861ac2a9de5593a90453c0ede Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 23 Aug 2023 10:11:48 +0200 Subject: Replace assert with diagnostics in bootstrap_src() (GH issue #322) --- libbuild2/file.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libbuild2') diff --git a/libbuild2/file.cxx b/libbuild2/file.cxx index 1b00662..87658dd 100644 --- a/libbuild2/file.cxx +++ b/libbuild2/file.cxx @@ -971,7 +971,16 @@ namespace build2 rs.root_extra->amalgamation = nullptr; rs.root_extra->subprojects = nullptr; + // See GH issue #322. + // +#if 0 assert (!aovr || aovr->empty ()); +#else + if (!(!aovr || aovr->empty ())) + fail << "amalgamation directory " << *aovr << " specified for simple " + << "project " << src_root << + info << "see https://github.com/build2/build2/issues/322 for details"; +#endif } // We assume that bootstrap out cannot load this file explicitly. It // feels wrong to allow this since that makes the whole bootstrap -- cgit v1.1