diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-03-20 13:21:18 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-03-20 13:21:18 +0200 |
commit | eaaa82bd9c1e24a83dcea3857f5fd75d0dfb6de5 (patch) | |
tree | 9d849682e5c8fb971382843064ea0c286d753cba /build/config/module.cxx | |
parent | b6e72877a1a26a6ae16961728ee57e45f657f717 (diff) |
New consolidated load/match/build loop
Diffstat (limited to 'build/config/module.cxx')
-rw-r--r-- | build/config/module.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/build/config/module.cxx b/build/config/module.cxx index bbaccdc..b184286 100644 --- a/build/config/module.cxx +++ b/build/config/module.cxx @@ -8,6 +8,8 @@ #include <build/scope> #include <build/diagnostics> +#include <build/config/operation> + using namespace std; namespace build @@ -28,12 +30,18 @@ namespace build { tracer trace ("config::load"); + //@@ TODO: avoid multiple loads (generally, for modules). + // + level4 ([&]{trace << "for " << root.path () << '/';}); + if (&root != &base) fail (l) << "config module must be loaded in project root scope"; - //@@ TODO: avoid multiple loads (generally, for modules). + // Register meta-operations. // - level4 ([&]{trace << "for " << root.path () << '/';}); + if (root.meta_operations.insert (configure) != configure_id || + root.meta_operations.insert (disfigure) != disfigure_id) + fail (l) << "config module must be loaded before other modules"; // Register the build/config.build loading trigger. // |