From 6b3e75edf034ebcbd048a24c283c7bcf7b1da019 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 25 May 2021 11:19:04 +0200 Subject: Add support for regex-based target type/pattern specific variables This is in addition to the already supported path-based target type/pattern specific variables. For example: hxx{*}: x = y # path-based hxx{~/.*/}: x = y # regex-based --- libbuild2/types.hxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libbuild2/types.hxx') diff --git a/libbuild2/types.hxx b/libbuild2/types.hxx index dd82ef1..8dfda6e 100644 --- a/libbuild2/types.hxx +++ b/libbuild2/types.hxx @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include // unique_ptr, shared_ptr @@ -44,6 +45,7 @@ #include #include +#include #include #include #include @@ -105,6 +107,14 @@ namespace build2 using std::endl; using std::streamsize; // C++'s ssize_t. + // Regex. + // + // Note that includes an ostream insertion operator for + // regex_error which prints cleaned up message, if any. + // + using std::regex; + using std::regex_error; + // Concurrency. // using std::atomic; -- cgit v1.1