diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-11-24 12:55:58 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-11-24 12:55:58 +0200 |
commit | 88b346394054416213d3d4e81e0a213403eb2ff7 (patch) | |
tree | ab633c53682749452a0f0503869714069df55f2b /build2/utility.txx | |
parent | 9bfd3788071d8e6f938d5b34366562fdfc300c68 (diff) |
Add extra library search paths as -L options
Diffstat (limited to 'build2/utility.txx')
-rw-r--r-- | build2/utility.txx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/build2/utility.txx b/build2/utility.txx index 28c7d6e..19a9819 100644 --- a/build2/utility.txx +++ b/build2/utility.txx @@ -4,6 +4,33 @@ namespace build2 { + template <typename I, typename F> + void + append_option_values (cstrings& args, const char* o, I b, I e, F&& get) + { + if (b != e) + { + args.reserve (args.size () + (e - b)); + + for (; b != e; ++b) + { + args.push_back (o); + args.push_back (get (*b)); + } + } + } + + template <typename I, typename F> + void + hash_option_values (sha256& cs, const char* o, I b, I e, F&& get) + { + for (; b != e; ++b) + { + cs.append (o); + cs.append (get (*b)); + } + } + template <typename K> basic_path<char, K> relative (const basic_path<char, K>& p) |