CBuild
C++ build system with scripts written in c++
|
Functions | |
void | init () |
Internal init. | |
void | RegisterTask (CBuild::Task *task) |
Register new task. | |
void | CallTask (std::string name, std::vector< std::string > args) |
Run tasks. | |
void | RegisterTarget (CBuild::Toolchain *target) |
Register new target for build. | |
CBuild::Toolchain * | GetToolchain (std::string name, bool force=false) |
Get the registered toolchain. | |
lib::map< std::string, CBuild::Toolchain * > | GetTargets () |
Get list of all targets. | |
void | RegisterKeyword (std::string key, CBuild::Task *func) |
Register new keyord for parsing, ! Dangerous, owerwriting existing keywords can lead to undefined behaviours. | |
lib::map< std::string, std::string > | GetKeywordsList () |
Get list of all user registered keywords. | |
void | SetRebuildName (std::string _name) |
Set the rebuilt CBuild executable name. | |
void | AddLinkArg (std::string arg) |
Add linker arg for CBuild rebuild. | |
void | AddCompileArg (std::string arg) |
Add compiler argument for CBuild rebuild. | |
void | SetVersionHandler (void(*handler)()) |
Set handler to add output to --version | |
void | ToolchainAll (bool force, std::string path, std::vector< std::string > *args) |
Call and execute all toolchains. | |
CBuild::generator_base * | GetGenerator (std::string id) |
Get generator for specified id. | |
void | RegisterGenerator (CBuild::generator_base *gen, std::string id) |
Register generator for id. | |
std::vector< std::string > | GetGeneratorsList () |
Get list of registered generators. | |
std::vector< std::string > | GetToolchainsList () |
Get list of registered toolchains. | |
std::vector< std::string > | GetTasksList () |
Get list of registered tasks. | |
CBuild::Toolchain * | GetRebuildTarget () |
Get target used for rebuild of CBuild script. | |
void | null_handler () |
Variables | |
void(* | handler )() = Registry::null_handler |
CBuild::Help | help |
CBuild::Init | initw |
CBuild::Version | ver |
CBuild::TaskList | tasklist |
CBuild::ToolchainList | toolchainlist |
CBuild::GeneratorList | generatorlist |
CBuild::CmdList | cmdlist |
CBuild::ccj_out | ccjo |
CBuild::makefile_out | makefileo |
CBuild::CBuildRebuildScript | rebuild_script |
lib::map< std::string, CBuild::Task * > | tasks |
lib::map< std::string, bool > | task_executed |
lib::map< std::string, CBuild::Toolchain * > | targets |
lib::map< std::string, bool > | target_executed |
lib::map< std::string, std::string > | keywords |
lib::map< std::string, CBuild::generator_base * > | generators |
void CBuild::Registry::AddCompileArg | ( | std::string | arg | ) |
Add compiler argument for CBuild rebuild.
arg | => std::string -> raw argument |
Definition at line 289 of file register.cpp.
References CBuild::Toolchain::add_compile_arg(), CBuild::arg, and rebuild_script.
void CBuild::Registry::AddLinkArg | ( | std::string | arg | ) |
Add linker arg for CBuild rebuild.
arg | => std::string -> raw argument |
Definition at line 285 of file register.cpp.
References CBuild::Toolchain::add_link_arg(), CBuild::arg, and rebuild_script.
void CBuild::Registry::CallTask | ( | std::string | name, |
std::vector< std::string > | args ) |
Run tasks.
name | => std::string -> Name of task |
args | => std::vector<std::string> -> Arguments for task |
Definition at line 206 of file register.cpp.
References CBuild::print(), and CBuild::RED.
Referenced by CBuild::Toolchain::call(), and CBuild::loop().
CBuild::generator_base * CBuild::Registry::GetGenerator | ( | std::string | id | ) |
Get generator for specified id.
id | => std::string -> Generator id |
Definition at line 317 of file register.cpp.
Referenced by CBuild::loop().
std::vector< std::string > CBuild::Registry::GetGeneratorsList | ( | ) |
Get list of registered generators.
Definition at line 331 of file register.cpp.
References generators.
Referenced by CBuild::GeneratorList::call(), and CBuild::generator_handler().
lib::map< std::string, std::string > CBuild::Registry::GetKeywordsList | ( | ) |
Get list of all user registered keywords.
Definition at line 276 of file register.cpp.
Referenced by CBuild::CmdList::call(), and CBuild::parse().
CBuild::Toolchain * CBuild::Registry::GetRebuildTarget | ( | ) |
Get target used for rebuild of CBuild script.
Definition at line 355 of file register.cpp.
References rebuild_script.
lib::map< std::string, CBuild::Toolchain * > CBuild::Registry::GetTargets | ( | ) |
Get list of all targets.
Definition at line 262 of file register.cpp.
std::vector< std::string > CBuild::Registry::GetTasksList | ( | ) |
Get list of registered tasks.
Definition at line 345 of file register.cpp.
References tasks.
Referenced by CBuild::TaskList::call(), and CBuild::task_handler().
CBuild::Toolchain * CBuild::Registry::GetToolchain | ( | std::string | name, |
bool | force = false ) |
Get the registered toolchain.
name | => std::string -> target id |
force | => bool -> default = false, if true does not look in list of executed toolchains |
Definition at line 239 of file register.cpp.
Referenced by CBuild::Toolchain::call(), CBuild::gcc_hash_impl(), CBuild::ccj_out::generate(), CBuild::loop(), CBuild::MINGW_GXX< hash >::post_link(), CBuild::MINGW_GXXMT< hash >::post_link(), CBuild::MINGW_GCC< hash >::post_link(), CBuild::MINGW_GCCMT< hash >::post_link(), and CBuild::Toolchain::stdargs().
std::vector< std::string > CBuild::Registry::GetToolchainsList | ( | ) |
Get list of registered toolchains.
Definition at line 338 of file register.cpp.
References targets.
Referenced by CBuild::build_handler(), and CBuild::ToolchainList::call().
void CBuild::Registry::init | ( | ) |
Internal init.
Definition at line 165 of file register.cpp.
References CBuild::Toolchain::add_compile_arg(), CBuild::Toolchain::add_folder(), CBuild::Toolchain::add_library_include(), CBuild::Toolchain::add_link_arg(), ccjo, cmdlist, CBuild::EXECUTABLE, generatorlist, help, initw, makefileo, rebuild_script, CBuild::Toolchain::set_standart(), CBuild::Toolchain::set_type(), tasklist, toolchainlist, ver, and CBuild::Toolchain::warn().
Referenced by CBuild::parse().
void CBuild::Registry::null_handler | ( | ) |
Definition at line 40 of file register.cpp.
void CBuild::Registry::RegisterGenerator | ( | CBuild::generator_base * | gen, |
std::string | id ) |
Register generator for id.
gen | => CBuild::generator_base* -> Generator instance |
id | => std::string -> Geneator id |
Definition at line 324 of file register.cpp.
References CBuild::print_full(), and CBuild::RED.
void CBuild::Registry::RegisterKeyword | ( | std::string | key, |
CBuild::Task * | func ) |
Register new keyord for parsing, ! Dangerous, owerwriting existing keywords can lead to undefined behaviours.
key | => std::string -> new keyword |
func | => Cbuild::Task -> task, associated with keyword |
Definition at line 266 of file register.cpp.
References CBuild::print_full(), CBuild::RED, and CBuild::Task::self_name().
void CBuild::Registry::RegisterTarget | ( | CBuild::Toolchain * | target | ) |
Register new target for build.
target | => CBuild::Toolchain* -> Pointer to staticly allocated class that extends CBuild::Toolchain |
Definition at line 226 of file register.cpp.
References CBuild::Toolchain::get_id(), CBuild::print_full(), and CBuild::RED.
Referenced by CBuild::CrossCompiler::perform_registry().
void CBuild::Registry::RegisterTask | ( | CBuild::Task * | task | ) |
Register new task.
task | => CBuild::Task* -> pointer to staticly allocated task |
Definition at line 194 of file register.cpp.
References CBuild::print_full(), CBuild::RED, and CBuild::Task::self_name().
void CBuild::Registry::SetRebuildName | ( | std::string | _name | ) |
Set the rebuilt CBuild executable name.
_name | => std::string -> new CBuild user executable name |
Definition at line 281 of file register.cpp.
References rebuild_script, and CBuild::Toolchain::set_name().
void CBuild::Registry::SetVersionHandler | ( | void(*)() | handler | ) |
Set handler to add output to --version
handler | => void (*)() -> Handler |
Definition at line 352 of file register.cpp.
References handler.
void CBuild::Registry::ToolchainAll | ( | bool | force, |
std::string | path, | ||
std::vector< std::string > * | args ) |
Call and execute all toolchains.
force | => bool -> Compilation type |
path | => std::string -> Base path |
args | => std::vector<std::string>* -> PArgs |
Definition at line 293 of file register.cpp.
Referenced by CBuild::loop().
CBuild::ccj_out CBuild::Registry::ccjo |
Definition at line 145 of file register.cpp.
Referenced by init().
CBuild::CmdList CBuild::Registry::cmdlist |
Definition at line 143 of file register.cpp.
Referenced by init().
CBuild::GeneratorList CBuild::Registry::generatorlist |
Definition at line 142 of file register.cpp.
Referenced by init().
lib::map<std::string, CBuild::generator_base*> CBuild::Registry::generators |
Definition at line 161 of file register.cpp.
Referenced by GetGeneratorsList().
void(* CBuild::Registry::handler) () | ( | ) | = Registry::null_handler |
Definition at line 42 of file register.cpp.
Referenced by CBuild::Version::call(), and SetVersionHandler().
CBuild::Help CBuild::Registry::help |
Definition at line 137 of file register.cpp.
Referenced by init().
CBuild::Init CBuild::Registry::initw |
Definition at line 138 of file register.cpp.
Referenced by init().
lib::map<std::string, std::string> CBuild::Registry::keywords |
Definition at line 159 of file register.cpp.
CBuild::makefile_out CBuild::Registry::makefileo |
Definition at line 146 of file register.cpp.
Referenced by init().
CBuild::CBuildRebuildScript CBuild::Registry::rebuild_script |
Definition at line 148 of file register.cpp.
Referenced by AddCompileArg(), AddLinkArg(), GetRebuildTarget(), init(), and SetRebuildName().
lib::map<std::string, bool> CBuild::Registry::target_executed |
Definition at line 157 of file register.cpp.
lib::map<std::string, CBuild::Toolchain*> CBuild::Registry::targets |
Definition at line 155 of file register.cpp.
Referenced by GetToolchainsList().
lib::map<std::string, bool> CBuild::Registry::task_executed |
Definition at line 153 of file register.cpp.
CBuild::TaskList CBuild::Registry::tasklist |
Definition at line 140 of file register.cpp.
Referenced by init().
lib::map<std::string, CBuild::Task*> CBuild::Registry::tasks |
Definition at line 151 of file register.cpp.
Referenced by GetTasksList().
CBuild::ToolchainList CBuild::Registry::toolchainlist |
Definition at line 141 of file register.cpp.
Referenced by init().
CBuild::Version CBuild::Registry::ver |
Definition at line 139 of file register.cpp.
Referenced by init().