From e4a9ccadf751b88f5508ce9f890484bae33d1aaf Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 5 Jun 2020 09:02:05 +0200 Subject: Add ability to split ad hoc C++ recipe into global and local fragments Specifically, now we can write: {{ c++ 1 -- #include -- recipe apply (action, target&) const override { ... } }} --- libbuild2/rule.hxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libbuild2/rule.hxx') 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 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 separator; string code; mutable atomic impl; }; -- cgit v1.1