From fa99825fa800f0faf4a6e6b1d639b261c7aa43c9 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 27 Dec 2025 15:08:07 +0100 Subject: Add many-to-one generator function type. --- src/ctor.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/ctor.h') diff --git a/src/ctor.h b/src/ctor.h index f145eef..dddc5ef 100644 --- a/src/ctor.h +++ b/src/ctor.h @@ -282,10 +282,17 @@ struct settings }; struct build_configuration; -using GeneratorCb = std::function; +using GeneratorOneToOne = + std::function; + +using GeneratorManyToOne = + std::function& input, + const std::string& output, + const ctor::build_configuration& config, + const ctor::settings& settings)>; struct build_configuration { @@ -297,7 +304,9 @@ struct build_configuration std::vector depends; // internal target dependencies ctor::flags flags; std::vector externals; // externals used by this configuration - GeneratorCb function; + std::variant function; }; using build_configurations = std::vector; -- cgit v1.2.3