From 5745a2fe944dca5612b31c099101914d6c60b223 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 14 Dec 2023 07:42:44 +0200 Subject: Allow enabling C++ modules for C++20 and later std.cxx values --- libbuild2/cc/compile-rule.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libbuild2/cc') diff --git a/libbuild2/cc/compile-rule.cxx b/libbuild2/cc/compile-rule.cxx index be5a680..b4d405b 100644 --- a/libbuild2/cc/compile-rule.cxx +++ b/libbuild2/cc/compile-rule.cxx @@ -5393,7 +5393,9 @@ namespace build2 if (!modules) { if (ut != unit_type::non_modular || !mi.imports.empty ()) - fail << "modules support required by " << src; + fail << "modules support required by " << src << + info << "consider enabling modules with " + << x << ".features.modules=true in root.build"; } else { @@ -6574,6 +6576,10 @@ namespace build2 // Find or create a modules sidebuild subproject returning its root // directory. // + // @@ Could we omit creating a subproject if the sidebuild scope is the + // project scope itself? This would speed up simple examples (and + // potentially direct compilation that we may support). + // pair compile_rule:: find_modules_sidebuild (const scope& rs) const { -- cgit v1.1