diff options
Diffstat (limited to 'build2/utility.cxx')
-rw-r--r-- | build2/utility.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/build2/utility.cxx b/build2/utility.cxx index dc862c6..ef90084 100644 --- a/build2/utility.cxx +++ b/build2/utility.cxx @@ -173,6 +173,13 @@ namespace build2 } void + append_options (strings& args, const lookup& l) + { + if (l) + append_options (args, cast<strings> (l)); + } + + void hash_options (sha256& csum, const lookup& l) { if (l) @@ -192,6 +199,18 @@ namespace build2 } void + append_options (strings& args, const strings& sv) + { + if (!sv.empty ()) + { + args.reserve (args.size () + sv.size ()); + + for (const string& s: sv) + args.push_back (s); + } + } + + void hash_options (sha256& csum, const strings& sv) { for (const string& s: sv) |