diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-12-14 07:42:44 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-12-14 09:29:01 +0200 |
commit | 5745a2fe944dca5612b31c099101914d6c60b223 (patch) | |
tree | 8f3b1828a4be49b05c785e431754f3c4dcc9cc5f /libbuild2/cc | |
parent | 22f50c76dd8d92cb64461f979369b601272a4772 (diff) |
Allow enabling C++ modules for C++20 and later std.cxx values
Diffstat (limited to 'libbuild2/cc')
-rw-r--r-- | libbuild2/cc/compile-rule.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
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<dir_path, const scope&> compile_rule:: find_modules_sidebuild (const scope& rs) const { |