aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/config/module.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-03-13 08:48:43 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-03-13 08:58:15 +0200
commit1adbf7b710d52958f6c0168ccb492252c1f19d4a (patch)
tree04ce492fd006d3c5cf98222f923adcc9845194f4 /libbuild2/config/module.cxx
parent1dbaaa16d0ea2c6af53f16ebb14c943fdd11bac4 (diff)
Cleanup and make config/utility.?xx part of build system core
Diffstat (limited to 'libbuild2/config/module.cxx')
-rw-r--r--libbuild2/config/module.cxx16
1 files changed, 16 insertions, 0 deletions
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 <libbuild2/config/module.hxx>
+#include <libbuild2/scope.hxx>
+
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> (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> (module::name))
+ m->save_module (name, prio);
+ }
+
const string module::name ("config");
const uint64_t module::version (1);
}