From d084b50790dcbf675f2d5f451c986b3128216980 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 9 Jul 2020 10:51:24 +0200 Subject: Load test and install modules implicitly for simple projects While these can be useful on their own, this also makes the test and install operations available in simple projects, which is handy for "glue" projects that "pull" (using ad hoc import) a bunch of other projects. --- build2/b.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build2/b.cxx b/build2/b.cxx index 5ef9062..347b94a 100644 --- a/build2/b.cxx +++ b/build2/b.cxx @@ -1047,6 +1047,16 @@ main (int argc, char* argv[]) // bootstrap_pre (rs, altn); bootstrap_src (rs, altn); + + // If this is a simple project, then implicitly load the test and + // install modules. + // + if (rs.root_extra->project == nullptr) + { + boot_module (rs, "test", location ()); + boot_module (rs, "install", location ()); + } + // bootstrap_post() delayed until after create_bootstrap_outer(). } else -- cgit v1.1