aboutsummaryrefslogtreecommitdiff
path: root/build2
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-07-09 10:51:24 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-07-09 10:51:24 +0200
commitd084b50790dcbf675f2d5f451c986b3128216980 (patch)
tree4d535713ca01c85b82a95c7f65db6abd1dc43877 /build2
parent101987533ca35e4aa3515b25415f1abba46e796f (diff)
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.
Diffstat (limited to 'build2')
-rw-r--r--build2/b.cxx10
1 files changed, 10 insertions, 0 deletions
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