From db8336a686a85f0e458acb2d5f1ad442585bfc9a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 1 Oct 2021 11:05:49 +0200 Subject: Add notion of internal scope, translate external -I to -isystem or equivalent --- libbuild2/utility.hxx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'libbuild2/utility.hxx') diff --git a/libbuild2/utility.hxx b/libbuild2/utility.hxx index f9f1daa..b62d2ab 100644 --- a/libbuild2/utility.hxx +++ b/libbuild2/utility.hxx @@ -650,6 +650,26 @@ namespace build2 I begin, I end, F&& get = [] (const string& s) {return s;}); + // As above but append a single option (used for append/hash uniformity). + // + inline void + append_option (cstrings& args, const char* o) + { + args.push_back (o); + } + + inline void + append_option (strings& args, const char* o) + { + args.push_back (o); + } + + inline void + append_option (sha256& csum, const char* o) + { + csum.append (o); + } + // Check if a specified option is present in the variable or value. T is // either target or scope. For the interator version use rbegin()/rend() to // search backwards. -- cgit v1.1