diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-11-04 13:34:52 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-11-04 15:15:30 +0200 |
commit | b39ce46b80ef5cccc592398e0a74ba8d02742ead (patch) | |
tree | a7ccf1a628ea8cf6a5804d4ad6c0b704fade5807 /libbuild2/config/operation.hxx | |
parent | 41a31b0a61464fd506166887f621100364e67276 (diff) |
Add $config.export() function
This is similar to the config.export variable functionality except it can be
called from within buildfiles.
Note that this function can only be used during configure unless the config
module creation was forced for other meta-operations with config.module=true
in bootstrap.build.
Diffstat (limited to 'libbuild2/config/operation.hxx')
-rw-r--r-- | libbuild2/config/operation.hxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libbuild2/config/operation.hxx b/libbuild2/config/operation.hxx index 8b2a29d..9ec854a 100644 --- a/libbuild2/config/operation.hxx +++ b/libbuild2/config/operation.hxx @@ -5,6 +5,8 @@ #ifndef LIBBUILD2_CONFIG_OPERATION_HXX #define LIBBUILD2_CONFIG_OPERATION_HXX +#include <set> + #include <libbuild2/types.hxx> #include <libbuild2/utility.hxx> @@ -23,6 +25,20 @@ namespace build2 vector_view<opspec>&, bool, const location&); + + // Configuration exporting. + // + using project_set = std::set<const scope*>; // Pointers for comparison. + + // If inherit is false, then don't rely on inheritance from outer scopes + // (used for config.export). In this case the already configured project + // set can be empty. + // + void + save_config (const scope& rs, + ostream&, const string& name, + bool inherit, + const project_set&); } } |