diff options
Diffstat (limited to 'build2/utility.hxx')
-rw-r--r-- | build2/utility.hxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/build2/utility.hxx b/build2/utility.hxx index 2fa7e6e..af26acd 100644 --- a/build2/utility.hxx +++ b/build2/utility.hxx @@ -355,6 +355,23 @@ namespace build2 void hash_options (sha256&, const strings&, size_t); + // As above but append/hash option values for the specified option (e.g., + // -I, -L). + // + template <typename I, typename F> + void + append_option_values (cstrings&, + const char* opt, + I begin, I end, + F&& get = [] (const string& s) {return s.c_str ();}); + + template <typename I, typename F> + void + hash_option_values (sha256&, + const char* opt, + I begin, I end, + F&& get = [] (const string& s) {return s;}); + // Check if a specified option is present in the variable or value. T is // either target or scope. // |