Finality Engine
Loading...
Searching...
No Matches
BuildSupport.h
Go to the documentation of this file.
1#pragma once
5#include <filesystem>
6#include <map>
7#include <string>
8#include <vector>
9#include <yaml-cpp/yaml.h>
10
11namespace FI::Build
12{
13namespace fs = std::filesystem;
15using Options = std::map<std::string, std::string>;
16std::string Read(const fs::path &path);
17void Write(const fs::path &path, const std::string &text);
18std::string Text(const fs::path &path);
19fs::path Path(const std::string &text);
20std::string Hash(const std::string &bytes);
21std::string HeaderHash(const fs::path &engine);
23std::string Run(const std::vector<std::string> &args, const fs::path &cwd);
24std::string Json(const YAML::Node &node);
25std::string Xml(std::string text);
26bool Inside(const fs::path &path, const fs::path &parent);
27std::string Name(std::string text);
30{
33};
34Toolchain FindToolchain(const fs::path &engine, const fs::path &bin, const std::string &config);
35void GenerateIDE(const fs::path &root, const fs::path &engine, const fs::path &bin, const fs::path &source,
36 const std::string &name, const std::string &config, const Toolchain &tools);
37void Native(const Options &options);
38void BuildInfo(const Options &options);
39void Dependencies(const Options &options);
40}
std::string Hash(const std::string &bytes)
std::string Run(const std::vector< std::string > &args, const fs::path &cwd)
Run an argument vector without a shell and capture output; throw on failure.
fs::path Path(const std::string &text)
void Dependencies(const Options &options)
bool Inside(const fs::path &path, const fs::path &parent)
std::string Text(const fs::path &path)
std::string Xml(std::string text)
void Native(const Options &options)
Toolchain FindToolchain(const fs::path &engine, const fs::path &bin, const std::string &config)
void GenerateIDE(const fs::path &root, const fs::path &engine, const fs::path &bin, const fs::path &source, const std::string &name, const std::string &config, const Toolchain &tools)
std::string Json(const YAML::Node &node)
std::string HeaderHash(const fs::path &engine)
void Write(const fs::path &path, const std::string &text)
std::string Read(const fs::path &path)
std::string Name(std::string text)
std::map< std::string, std::string > Options
Parsed command-line switches; paths are encoded as UTF-8.
void BuildInfo(const Options &options)
Installed compiler, SDK and build tool matching an engine's recorded ABI inputs.
std::string SDKVersion