From 88b346394054416213d3d4e81e0a213403eb2ff7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 24 Nov 2017 12:55:58 +0200 Subject: Add extra library search paths as -L options --- build2/utility.txx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'build2/utility.txx') 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 + 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 + 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 basic_path relative (const basic_path& p) -- cgit v1.1