diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-05-25 11:19:04 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-05-28 10:10:44 +0200 |
commit | 6b3e75edf034ebcbd048a24c283c7bcf7b1da019 (patch) | |
tree | 4dff34692fd09c6f201a486c0d92549adc864947 /libbuild2/types.hxx | |
parent | bb02e152dc036879ab0b2d1d8aa2cb19084b8e16 (diff) |
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
Diffstat (limited to 'libbuild2/types.hxx')
-rw-r--r-- | libbuild2/types.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
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 <map> #include <array> #include <tuple> +#include <regex> #include <vector> #include <string> #include <memory> // unique_ptr, shared_ptr @@ -44,6 +45,7 @@ #include <libbutl/path.mxx> #include <libbutl/path-map.mxx> +#include <libbutl/regex.mxx> #include <libbutl/sha256.mxx> #include <libbutl/process.mxx> #include <libbutl/fdstream.mxx> @@ -105,6 +107,14 @@ namespace build2 using std::endl; using std::streamsize; // C++'s ssize_t. + // Regex. + // + // Note that <libbutl/regex.mxx> 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; |