21#ifndef __MANUAL_HASH_HPP__
22#define __MANUAL_HASH_HPP__
40 unsigned long pos = file.find_last_of(
".");
42 file = file.substr(0, pos);
44 while (file.find(
"/") != std::string::npos) {
45 file.replace(file.find(
"/"), std::string(
"/").size(),
".");
58 std::vector<std::string> objects_list)
override {
59 if (file_list.size() != objects_list.size()) {
64 for (
size_t i = 0; i < files.size(); i++) {
65 ret.
push_back(files.at(i), this->gen_out_file(files.at(i)));
74 if (cargs != meta.
cargs) {
86 if (largs != meta.
largs) {
94 std::string packer)
override {
113 if (out != meta.
out) {
120 virtual void set_target_meta(std::vector<std::string> cargs, std::vector<std::string> largs,
121 std::string out, std::string compiler, std::string linker,
122 std::string packer)
override {
#define CBUILD_BUILD_CACHE_DIR
Object cache in build/toolchain.
#define CBUILD_BUILD_DIR
Build directory of CBuild.
Build metadata config file.
std::string gen_out_file(std::string file)
virtual int compare_and_set_output_file(std::string out) override
Compare output file name and update metadata.
virtual lib::map< std::string, std::string > get_files_for_recompilation(std::vector< std::string > file_list, std::vector< std::string > objects_list) override
Pass a list of source files and coresponding object files and get a map of source-object that need to...
virtual int compare_and_set_cargs(std::vector< std::string > cargs) override
Compare compile args and update metadata.
CBuildHash(std::string target_id)
virtual int compare_and_set_largs(std::vector< std::string > largs) override
Compare link args and update metadata.
virtual void set_target_meta(std::vector< std::string > cargs, std::vector< std::string > largs, std::string out, std::string compiler, std::string linker, std::string packer) override
Set the target meta.
virtual int compare_and_set_commands(std::string compiler, std::string linker, std::string packer) override
Compare shell commands used for compilation and update metadata.
Simple map implementation with some stack operation added.
void push_back(lib::mapData< _K, _D > element)
Push new element to map, stack operation ! Dangerous not perform chak if this elemnt exists in map.
Hasher base class and some helper functions This file implements some helper funtions,...
Custom implementation of map datatype.
Filebuffer for CBuild ecosystem.
std::vector< std::string > get_files(std::vector< std::string > files, std::vector< std::string > objects, std::string toolchain_id)
Get changed files.
int read_target_metadata(std::string target_id, CBuild::target_metadata_file *metadata)
Load metadata for a full target.
int write_target_metadata(std::string target_id, CBuild::target_metadata_file *metadata)
Write a metadata for a full target.