32std::vector<std::string>
log;
39 ret += std::string(
"=");
41 ret += std::string(
"; ");
63 char* buffer = (
char*)malloc(buffsize);
66 while ((bytesread = fread(buffer,
sizeof(buffer[0]),
sizeof(buffer), pipe)) != 0) {
67 ret += std::string(buffer, bytesread);
Set environment variables.
Filebuffer for CBuild ecosystem.
std::string remove_env_var(std::string var)
Remove registered environment var.
bool is_system_enabled()
Check if CBuild::system enabled.
void change_env_var(std::string var, std::string new_value)
Change value for environment var.
void print(std::string msg, color fg=CBuild::WHITE)
Print colored text to STDOUT.
std::vector< std::string > * get_log()
Get the internall command log.
void enable_system()
Reanable system commands execution, used only in pkg-config.
std::string get_env_vars()
void disable_system()
Disable system commands execution.
void add_env_var(std::string var, std::string value)
Add environment variable to CBuild::system and CBuild::system_piped calls.
int system(std::string cmd)
Call stdlib system() and print cmd to shell.
std::string system_piped(std::string cmd, unsigned int buffsize)
Execute command and return it's output.
std::vector< std::string > log
std::map< std::string, std::string > env_vars
Custom print that support color codes.
Command for compile_commands.json.