From 1adbf7b710d52958f6c0168ccb492252c1f19d4a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 13 Mar 2020 08:48:43 +0200 Subject: Cleanup and make config/utility.?xx part of build system core --- libbuild2/config/module.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'libbuild2/config/module.cxx') diff --git a/libbuild2/config/module.cxx b/libbuild2/config/module.cxx index 176eef0..96107cc 100644 --- a/libbuild2/config/module.cxx +++ b/libbuild2/config/module.cxx @@ -3,6 +3,8 @@ #include +#include + using namespace std; namespace build2 @@ -45,12 +47,26 @@ namespace build2 return true; } + void module:: + save_variable (scope& rs, const variable& var, uint64_t flags) + { + if (module* m = rs.find_module (module::name)) + m->save_variable (var, flags); + } + bool module:: save_module (const char* name, int prio) { return saved_modules.insert (string ("config.") += name, prio).second; } + void module:: + save_module (scope& rs, const char* name, int prio) + { + if (module* m = rs.find_module (module::name)) + m->save_module (name, prio); + } + const string module::name ("config"); const uint64_t module::version (1); } -- cgit v1.1