diff options
| author | Bent Bisballe Nyeng <deva@aasimon.org> | 2026-02-02 18:30:58 +0100 |
|---|---|---|
| committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2026-02-02 18:57:44 +0100 |
| commit | 6accb227b75fef7e99257b0078eb95f9aa0823cc (patch) | |
| tree | 41ed3773d1f8b05eea0e6ff86010237f6e4bd25a /src/tasks.cc | |
| parent | 19d1dd34fbc87b6637147785332f180e36acdfef (diff) | |
New syntax
Diffstat (limited to 'src/tasks.cc')
| -rw-r--r-- | src/tasks.cc | 11 |
1 files changed, 6 insertions, 5 deletions
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<std::shared_ptr<Task>> 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<std::monostate>(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<std::shared_ptr<Task>> 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<TaskCC>(ctor::target_type::object, config, settings, sourceDir, source); @@ -116,8 +118,7 @@ std::vector<std::shared_ptr<Task>> taskFactory(const ctor::build_configuration& #ifndef BOOTSTRAP else { - bool multi{std::holds_alternative<ctor::GeneratorManyToOne>(config.function)}; - if(multi) + if(config.function_many_to_one) { auto task = std::make_shared<TaskFn>(resolved_target_type, config, settings, sourceDir, ""); |
