aboutsummaryrefslogtreecommitdiff
path: root/build/config/utility.txx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-07-31 12:52:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-07-31 12:52:20 +0200
commitbbd0f3bb21442a2833916110cbe8e9a07e9f4c1f (patch)
treed25de6f2bcfa4b6cabe1fd55a1b8f508005de4c1 /build/config/utility.txx
parent729b56300c441a0d63c7d2013eb5a881211d352b (diff)
Essential install module functionality
Diffstat (limited to 'build/config/utility.txx')
-rw-r--r--build/config/utility.txx24
1 files changed, 24 insertions, 0 deletions
diff --git a/build/config/utility.txx b/build/config/utility.txx
index bee8a0b..cffdecf 100644
--- a/build/config/utility.txx
+++ b/build/config/utility.txx
@@ -57,5 +57,29 @@ namespace build
return r;
}
+
+ template <typename T>
+ void
+ append_options (cstrings& args, T& s, const char* var)
+ {
+ if (auto val = s[var])
+ append_options (args, val.template as<const list_value&> (), var);
+ }
+
+ template <typename T>
+ bool
+ find_option (const char* option, T& s, const char* var)
+ {
+ if (auto val = s[var])
+ {
+ for (const name& n: val.template as<const list_value&> ())
+ {
+ if (n.simple () && n.value == option)
+ return true;
+ }
+ }
+
+ return false;
+ }
}
}