diff options
Diffstat (limited to 'src/tasks.h')
-rw-r--r-- | src/tasks.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/tasks.h b/src/tasks.h index f2a77d4..ed1bf60 100644 --- a/src/tasks.h +++ b/src/tasks.h @@ -4,40 +4,37 @@ #pragma once #include <string> -#include <list> +#include <set> #include <memory> #include <deque> #include "task.h" -class BuildConfiguration; -class Settings; - struct Target { - BuildConfiguration config; + ctor::build_configuration config; std::string path; }; //! Get list of all registered targets -const std::deque<Target>& getTargets(const Settings& settings, +const std::deque<Target>& getTargets(const ctor::settings& settings, bool resolve_externals = true); //! Returns next dirty task from the dirtyTasks list that has all its dependencies //! fulfilled. //! The returned task is removed from the dirty list. //! Return nullptr if no dirty task is ready. -std::shared_ptr<Task> getNextTask(const std::list<std::shared_ptr<Task>>& allTasks, - std::list<std::shared_ptr<Task>>& dirtyTasks); +std::shared_ptr<Task> getNextTask(const std::set<std::shared_ptr<Task>>& allTasks, + std::set<std::shared_ptr<Task>>& dirtyTasks); //! Get list of tasks filtered by name including each of their direct //! dependency tasks (ie. objects tasks from their sources). -std::list<std::shared_ptr<Task>> getTasks(const Settings& settings, - const std::vector<std::string> names = {}, - bool resolve_externals = true); +std::set<std::shared_ptr<Task>> getTasks(const ctor::settings& settings, + const std::vector<std::string> names = {}, + bool resolve_externals = true); //! Generate list of targets from a single configuration, including the final //! link target and all its objects files (if any). -std::list<std::shared_ptr<Task>> taskFactory(const BuildConfiguration& config, - const Settings& settings, - const std::string& sourceDir); +std::set<std::shared_ptr<Task>> taskFactory(const ctor::build_configuration& config, + const ctor::settings& settings, + const std::string& sourceDir); |