This commit is contained in:
ProgramSnail 2022-08-04 01:22:09 +03:00
parent 4d899f64a7
commit b4a7121411
23 changed files with 681 additions and 11 deletions

26
cli_common.hpp Normal file
View file

@ -0,0 +1,26 @@
#pragma once
#include <cstddef>
#include <iostream>
#include <optional>
#include "build_graph.hpp"
#include "builder.hpp"
void print(const std::string& message, std::ostream* out);
template <typename T>
void getParam(const std::string& message, T& param, std::istream &in,
std::ostream* out);
build_system::Builder constructBuilder(std::istream& in,
std::ostream* out = nullptr);
build_system::BuildGraph constructBuildGraph(std::istream& in,
std::ostream* out = nullptr);
size_t constructTargetId(std::istream& in, std::ostream* out = nullptr);
void execute(build_system::Builder& builder,
build_system::BuildGraph& build_graph, size_t target_id,
std::ostream* out = nullptr);