// -*- c++ -*- // Distributed under the BSD 2-Clause License. // See accompanying file LICENSE for details. #pragma once #include #include #include #include "task.h" struct Target { ctor::build_configuration config; std::string path; }; //! Get list of all registered targets const std::deque& 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 getNextTask(const std::vector>& allTasks, std::vector>& dirtyTasks); //! Get list of tasks filtered by name including each of their direct //! dependency tasks (ie. objects tasks from their sources). std::vector> getTasks(const ctor::settings& settings, const std::vector 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::vector> taskFactory(const ctor::build_configuration& config, const ctor::settings& settings, const std::string& sourceDir, bool is_self);