aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/version
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-03-30 15:30:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-03-31 07:32:46 +0200
commitdfb51bc816cde2cb345f8a0300205e6ac95a2065 (patch)
treead5996b87bb3829f7058aa990fab65940b575249 /libbuild2/version
parent65340a0a897c91b580db1de0bab026a0814c5d74 (diff)
Switch to project variable visibility by default
Diffstat (limited to 'libbuild2/version')
-rw-r--r--libbuild2/version/init.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/libbuild2/version/init.cxx b/libbuild2/version/init.cxx
index 135f2db..d30dc24 100644
--- a/libbuild2/version/init.cxx
+++ b/libbuild2/version/init.cxx
@@ -226,17 +226,13 @@ namespace build2
// Note also that we have "gifted" the config.version variable name to
// the config module.
//
- auto& vp (rs.var_pool ());
-
- auto set = [&vp, &rs] (const char* var, auto val)
+ auto set = [&rs] (auto var, auto val)
{
- using T = decltype (val);
- auto& v (vp.insert<T> (var, variable_visibility::project));
- rs.assign (v) = move (val);
+ rs.assign (var, move (val));
};
- if (!sum.empty ()) rs.assign (ctx.var_project_summary) = move (sum);
- if (!url.empty ()) rs.assign (ctx.var_project_url) = move (url);
+ if (!sum.empty ()) set (ctx.var_project_summary, move (sum));
+ if (!url.empty ()) set (ctx.var_project_url, move (url));
set ("version", v.string ()); // Project version (var_version).