From f500b3274b4c937d315a652aad3bfcdd808b49ec Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 2 Nov 2021 15:18:05 +0200 Subject: Add $sort() function Available overloads: $sort( [, ]) $sort( [, ]) $sort( [, ]) $sort( [, ]) $sort( [, ]) The following flag is supported by the all overloads: dedup - in addition to sorting also remove duplicates Additionally, the strings overload also support the following flag: icase - sort ignoring case Note that on case-insensitive filesystem the paths and dir_paths overload's order is case-insensitive. --- libbuild2/functions-name.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libbuild2/functions-name.cxx') diff --git a/libbuild2/functions-name.cxx b/libbuild2/functions-name.cxx index 43bd8cb..9ba20a8 100644 --- a/libbuild2/functions-name.cxx +++ b/libbuild2/functions-name.cxx @@ -63,6 +63,8 @@ namespace build2 // function_family fn (m, "name"); + fn["string"] += [](name n) {return to_string (n);}; + fn["name"] += [](const scope* s, name n) { return to_target_name (s, move (n)).first.value; -- cgit v1.1