|
|
|
|
|
|
|
|
|
|
|
|
|
|
template <typename T, typename Range> |
|
|
template <typename T, typename Range> |
|
|
decltype(auto) pair_up(T& left, Range& right) { |
|
|
decltype(auto) pair_up(T& left, Range& right) { |
|
|
auto rep = ranges::view::repeat(left); |
|
|
|
|
|
return ranges::view::zip(rep, right); |
|
|
|
|
|
|
|
|
auto rep = ranges::views::repeat(left); |
|
|
|
|
|
return ranges::views::zip(rep, right); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} // namespace |
|
|
} // namespace |
|
|
|
|
|
|
|
|
void build_plan::render_all(build_env_ref env) const { |
|
|
void build_plan::render_all(build_env_ref env) const { |
|
|
auto templates = _packages // |
|
|
|
|
|
| ranges::view::transform(&package_plan::libraries) // |
|
|
|
|
|
| ranges::view::join // |
|
|
|
|
|
| ranges::view::transform([](const auto& lib) { return pair_up(lib, lib.templates()); }) // |
|
|
|
|
|
| ranges::view::join; |
|
|
|
|
|
|
|
|
auto templates = _packages // |
|
|
|
|
|
| ranges::views::transform(&package_plan::libraries) // |
|
|
|
|
|
| ranges::views::join // |
|
|
|
|
|
| ranges::views::transform( |
|
|
|
|
|
[](const auto& lib) { return pair_up(lib, lib.templates()); }) // |
|
|
|
|
|
| ranges::views::join; |
|
|
for (const auto& [lib, tmpl] : templates) { |
|
|
for (const auto& [lib, tmpl] : templates) { |
|
|
tmpl.render(env, lib.library_()); |
|
|
tmpl.render(env, lib.library_()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
fs::path filepath; |
|
|
fs::path filepath; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
auto as_pending = // |
|
|
|
|
|
ranges::view::all(filepaths) // |
|
|
|
|
|
| ranges::view::transform([](auto&& path) { |
|
|
|
|
|
|
|
|
auto as_pending = // |
|
|
|
|
|
ranges::views::all(filepaths) // |
|
|
|
|
|
| ranges::views::transform([](auto&& path) { |
|
|
return pending_file{false, fs::weakly_canonical(path)}; |
|
|
return pending_file{false, fs::weakly_canonical(path)}; |
|
|
}) |
|
|
}) |
|
|
| ranges::to_vector; |
|
|
| ranges::to_vector; |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
auto comps |
|
|
auto comps |
|
|
= iter_compilations(*this) | ranges::view::filter(check_compilation) | ranges::to_vector; |
|
|
|
|
|
|
|
|
= iter_compilations(*this) | ranges::views::filter(check_compilation) | ranges::to_vector; |
|
|
|
|
|
|
|
|
bool any_unmarked = false; |
|
|
bool any_unmarked = false; |
|
|
auto unmarked = ranges::view::filter(as_pending, ranges::not_fn(&pending_file::marked)); |
|
|
|
|
|
|
|
|
auto unmarked = ranges::views::filter(as_pending, ranges::not_fn(&pending_file::marked)); |
|
|
for (auto&& um : unmarked) { |
|
|
for (auto&& um : unmarked) { |
|
|
dds_log(error, "Source file [{}] is not compiled by this project", um.filepath.string()); |
|
|
dds_log(error, "Source file [{}] is not compiled by this project", um.filepath.string()); |
|
|
any_unmarked = true; |
|
|
any_unmarked = true; |