aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/config/utility.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-09-20 09:57:13 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-09-20 09:57:13 +0200
commitbdcd4211cf76bc75dd6f9a16fa3835632dfb7f20 (patch)
tree6c928ff6e42b17adc9ff0745b88d5604cadd1f02 /libbuild2/config/utility.ixx
parent280c4fc46e8485d52a5faaf4c9585b865080ed7b (diff)
Assign pre-defined semantics to config.<project>.develop variables
This variable allows a project to distinguish between development and consumption builds. While normally there is no distinction between these two modes, sometimes a project may need to provide additional functionality during development. For example, a source code generator which uses its own generated code in its implementation may need to provide a bootstrap step from the pre-generated code. Normally, such a step is only needed during development. See "Project Configuration" in the manual for details.
Diffstat (limited to 'libbuild2/config/utility.ixx')
-rw-r--r--libbuild2/config/utility.ixx13
1 files changed, 8 insertions, 5 deletions
diff --git a/libbuild2/config/utility.ixx b/libbuild2/config/utility.ixx
index 79d5470..d8348bd 100644
--- a/libbuild2/config/utility.ixx
+++ b/libbuild2/config/utility.ixx
@@ -6,22 +6,25 @@ namespace build2
namespace config
{
LIBBUILD2_SYMEXPORT pair<lookup, bool>
- lookup_config_impl (scope&, const variable&);
+ lookup_config_impl (scope&, const variable&, uint64_t);
template <typename T>
pair<lookup, bool>
lookup_config_impl (scope&, const variable&, T&&, uint64_t, bool);
inline lookup
- lookup_config (scope& rs, const variable& var)
+ lookup_config (scope& rs, const variable& var, uint64_t sflags)
{
- return lookup_config_impl (rs, var).first;
+ return lookup_config_impl (rs, var, sflags).first;
}
inline lookup
- lookup_config (bool& new_value, scope& rs, const variable& var)
+ lookup_config (bool& new_value,
+ scope& rs,
+ const variable& var,
+ uint64_t sflags)
{
- auto r (lookup_config_impl (rs, var));
+ auto r (lookup_config_impl (rs, var, sflags));
new_value = new_value || r.second;
return r.first;
}