From be2184d36d4492e43fbed1f6581fa26636d803ac Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 3 Feb 2026 21:54:09 +0100 Subject: Remove ctor::flags construct and apply tool specific flags (ie. ctor::cxx_flags, ...) directly in build config. Loosen generator requirements, to allow for lambda's directly. --- src/ctor.h | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/ctor.h b/src/ctor.h index bac1e3a..96cc24b 100644 --- a/src/ctor.h +++ b/src/ctor.h @@ -364,10 +364,14 @@ struct build_configuration std::is_same_v || std::is_same_v || std::is_same_v || - std::is_same_v || std::is_same_v || - std::is_same_v || - std::is_same_v + std::is_convertible_v || + std::is_convertible_v || + std::is_same_v || + std::is_same_v || + std::is_same_v || + std::is_same_v || + std::is_same_v ) && ...) constexpr build_configuration(Args && ... arg) { @@ -397,22 +401,38 @@ struct build_configuration { depends = arg.depends; } - else if constexpr(std::is_same_v) - { - flags = arg; - } else if constexpr(std::is_same_v) { externals = arg.externals; } - else if constexpr(std::is_same_v) + else if constexpr(std::is_convertible_v) { function_one_to_one = arg; } - else if constexpr(std::is_same_v) + else if constexpr(std::is_convertible_v) { function_many_to_one = arg; } + else if constexpr(std::is_same_v) + { + flags.cflags = arg; + } + else if constexpr(std::is_same_v) + { + flags.cxxflags = arg; + } + else if constexpr(std::is_same_v) + { + flags.ldflags = arg; + } + else if constexpr(std::is_same_v) + { + flags.arflags = arg; + } + else if constexpr(std::is_same_v) + { + flags.asmflags = arg; + } }(), ...); } -- cgit v1.2.3