From 6accb227b75fef7e99257b0078eb95f9aa0823cc Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 2 Feb 2026 18:30:58 +0100 Subject: New syntax --- src/tasks.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/tasks.cc') diff --git a/src/tasks.cc b/src/tasks.cc index f520772..5e1d235 100644 --- a/src/tasks.cc +++ b/src/tasks.cc @@ -85,7 +85,7 @@ std::vector> taskFactory(const ctor::build_configuration& ctor::target_type resolved_target_type{config.type}; if(resolved_target_type == ctor::target_type::automatic) { - if(!std::holds_alternative(config.function)) + if(config.function_one_to_one || config.function_many_to_one) { resolved_target_type = ctor::target_type::function; } @@ -103,8 +103,10 @@ std::vector> taskFactory(const ctor::build_configuration& for(const auto& source : config.sources) { if(source.toolchain == ctor::toolchain::any || - (config.system == ctor::output_system::build && source.toolchain == c.build_toolchain) || - (config.system == ctor::output_system::host && source.toolchain == c.host_toolchain)) + (config.system == ctor::output_system::build && + source.toolchain == c.build_toolchain) || + (config.system == ctor::output_system::host && + source.toolchain == c.host_toolchain)) { auto task = std::make_shared(ctor::target_type::object, config, settings, sourceDir, source); @@ -116,8 +118,7 @@ std::vector> taskFactory(const ctor::build_configuration& #ifndef BOOTSTRAP else { - bool multi{std::holds_alternative(config.function)}; - if(multi) + if(config.function_many_to_one) { auto task = std::make_shared(resolved_target_type, config, settings, sourceDir, ""); -- cgit v1.2.3