CBuild
C++ build system with scripts written in c++
Loading...
Searching...
No Matches
CBuild.hpp
Go to the documentation of this file.
1
23#ifndef __CBUILD_CORE_HPP__
24#define __CBUILD_CORE_HPP__
25// C++ libraries
26#include "map.hpp"
27#include "string"
28#include "vector"
29// Code
30namespace CBuild {
80RType parse(lib::map<std::string, std::string>* args, int argc, char** argv);
91void rebuild(std::string scripts);
97std::string get_version_string();
116int* get_version_array();
124std::string get_random_string(unsigned int length);
125} // namespace CBuild
126#endif // __CBUILD_CORE_HPP__
Simple map implementation with some stack operation added.
Definition map.hpp:79
Custom implementation of map datatype.
Filebuffer for CBuild ecosystem.
Definition Build.hpp:34
std::string get_version_string()
Return version as string.
Definition CBuild.cpp:558
int * get_version_array()
Get full CBuild version as int array of two components, no oveflow or rewrite check !
Definition CBuild.cpp:567
int get_version_major()
Get major component of CBuild version.
Definition CBuild.cpp:561
RType parse(lib::map< std::string, std::string > *args, int argc, char **argv)
Parse arguments.
RType
Run mode.
Definition CBuild.hpp:34
@ REBUILD
Rebuild user executable.
Definition CBuild.hpp:62
@ ERROR
Some error occurred.
Definition CBuild.hpp:70
@ DEBUG
Build and run target in debug mode.
Definition CBuild.hpp:54
@ RUN
Run target.
Definition CBuild.hpp:46
@ CLEAR
Clear build output and cache.
Definition CBuild.hpp:58
@ TASK
Run task.
Definition CBuild.hpp:38
@ BUILD_RUN
Build and run target.
Definition CBuild.hpp:50
@ LOAD_DEPS
Load other project deps.
Definition CBuild.hpp:66
@ BUILD
Build target.
Definition CBuild.hpp:42
int get_version_minor()
Get minor component of CBuild version.
Definition CBuild.cpp:564
std::string get_random_string(unsigned int length)
Generate random string with specified range, on Linux can use /dev/urandom.
Definition CBuild.cpp:570
void loop(RType mode, lib::map< std::string, std::string > *args)
loop of CBuild
Definition CBuild.cpp:281
void rebuild(std::string scripts)
Rebuild userspace part of CBuild.
Definition CBuild.cpp:550