aboutsummaryrefslogtreecommitdiff
path: root/build/config/module.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build/config/module.cxx')
-rw-r--r--build/config/module.cxx12
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.
//