blob: 26cd757b41b2f7aff588b79943c3043cd65f2c31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// -*- c++ -*-
// Distributed under the BSD 2-Clause License.
// See accompanying file LICENSE for details.
#pragma once
#include <string>
#include <set>
#include <memory>
#include <deque>
#include "task.h"
struct Target
{
ctor::BuildConfiguration config;
std::string path;
};
//! Get list of all registered targets
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::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::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::set<std::shared_ptr<Task>> taskFactory(const ctor::BuildConfiguration& config,
const ctor::Settings& settings,
const std::string& sourceDir);
|