aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/rule.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-06-05 09:02:05 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-06-05 09:04:29 +0200
commite4a9ccadf751b88f5508ce9f890484bae33d1aaf (patch)
tree7c3045ce2a7dc450f4271a6f8fc7e7cc32fa1019 /libbuild2/rule.hxx
parent9ec2bdd87659438b4aa021a10c4a4977ef77118e (diff)
Add ability to split ad hoc C++ recipe into global and local fragments
Specifically, now we can write: {{ c++ 1 -- #include <map> -- recipe apply (action, target&) const override { ... } }}
Diffstat (limited to 'libbuild2/rule.hxx')
-rw-r--r--libbuild2/rule.hxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/libbuild2/rule.hxx b/libbuild2/rule.hxx
index c98c29e..aa2f003 100644
--- a/libbuild2/rule.hxx
+++ b/libbuild2/rule.hxx
@@ -253,7 +253,9 @@ namespace build2
virtual recipe
apply (action, target&) const override;
- adhoc_cxx_rule (const location&, size_t, uint64_t version);
+ adhoc_cxx_rule (const location&, size_t,
+ uint64_t ver,
+ optional<string> sep);
virtual bool
recipe_text (context&, const target&, string&& t, attributes&) override;
@@ -269,6 +271,7 @@ namespace build2
// targets which could all be matched in parallel.
//
uint64_t version;
+ optional<string> separator;
string code;
mutable atomic<cxx_rule*> impl;
};