CBuild
C++ build system with scripts written in c++
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
CBuild::Help Class Reference

#include <CBuild_help_task.hpp>

Inheritance diagram for CBuild::Help:
CBuild::Task

Public Member Functions

 Help ()
 
void call (std::vector< std::string > args)
 Executed on task call.
 
- Public Member Functions inherited from CBuild::Task
 Task (std::string name, std::vector< std::string > required)
 Construct a new Task object.
 
std::string self_name ()
 Return task name.
 
std::vector< std::string > self_required ()
 Return required tasks.
 

Private Attributes

std::string data = "CBuild help - v13.0\nCommand line options:\n\t `-f` - force recompilation of all files.\n\t `-v` - verbose output, some addition info and some debugging info, mask `--no-cli-out` if used before.\n\t `--no-cli-out` - no output from CBuild at all, mask `-v` if used before.\n\t `-g make` - generate Makefile based on output from CBuild, simly log all executed command and pack it in Makefile syntax, so, sadly, CBuild::fs calls not propagate to Makefile.\n\t `-g ccj` - generate compile_commands.json, use internal command evaluator in CBuild::Toolchain, from the box work only for toolchains, that use standard compiler calling convention, see below.\n\t `-ld <toolchain_name>` - load dependencies of specified target, only for CBuild dependencies.\n\t `-b <toolchain_name>` - build specified target.\n\t `-b all` - build all registered targets\n\t `-r <toolchain_name>` - run specified target.\n\t `-br <toolchain_name>` - build and then run specified target.\n\t `-d <toolchain_name>` - build and then run specified target in debug mode. Now work only with gdb on linux.\n\t `-c <toolchain_name>` - clear all data of specified target.\n\t `-t <task_name>` - run specified task.\n\t `-a <arg>` - set some argument (see it as #define arg, without value). It can be used by ran toolchain or ran task. No preprocessing, simple propagation for user-defined arguments, preserver order in what arguments is specified.\n\t `-pa <arg>` - specify argument for ran app, propagated to app ran by `-r` and `-br`, in `-d` arguments propagates to debugger.\n\t `--rebuild` - rebuild CBuild executable.\n\t `--init` - init CBuild folder structure, not always required.\n\t `--help` - print help message - this information.\n\t `--version` - print curent version of CBuild\n\t `--task-list` - print list of all registered tasks\n\t `--target-list` - print list of all registered targets\n\t `--generator-list` - print list of all registered generators\n\t `--commands-list` - print list of all registered user commands\nCBuild folder structure: \n<project_root>\n |\n | - src : Project sources folder\n | |\n | | - main.cpp : Have main() function of project implemented\n |\n | - scripts\n | |\n | | - main.cpp : Main file of CBuild user scripts, init CBuild and call user init\n | | - user_init.cpp : Implement user init function, have build sript implemented\n | | - user_init.hpp : Header to glue together two .cpp files\n | - cache : CBuild dir for some temporary data\n | |\n | | - headers : Header of included CBuild projects\n | | - libs : .so / .a files of included CBuild projects\n | | - tmp : Directory for temporary runtime data of CBuild \n |\n | - build\n | |\n | | - <toolchain_name>\n | | | - config : Hash storage directory\n | | | |\n | | | | - src.main.meta : Metadata for src/main.cpp\n | | | - objs : Saved .o files of specified target\n | | | - out : Output files of specified target\n | | | - <toolchain_name>.meta : Metadata for a full target\n |\n | - CBuild.run : Main executable of CBuild\nSome useful information: \n Compiler calling convention:: \n\t - All compilations is done in two steps: compilation `<compiler> -c <file> <arguments> -o <object>` and then linking `<linker> <objects> <arguments> -o <output binary>`\n Hasher general requirments: \n\t - All hashers are inherited of CBuild::Hash class. \n\t - Class constructor need to take one argument of type std::string and pass it to a base class. \n\t - Function 'get_files_for_recompilation' need to construct a `lib::map<std::string, std::string>` of source->object mappings of files that need to be recompiled, files and objects array are for one set of files, `objects.at(1)` is an object for a source file at `files.at(1)`. So, this function need to produce a list of files that need to be recompiled and update stored metadata. \n\t - All other function need to return an int value acording to their doxygen docs and also update a coresponding metadata value. \n"
 

Detailed Description

Definition at line 28 of file CBuild_help_task.hpp.

Constructor & Destructor Documentation

◆ Help()

CBuild::Help::Help ( )
inline

Definition at line 33 of file CBuild_help_task.hpp.

Member Function Documentation

◆ call()

void CBuild::Help::call ( std::vector< std::string > args)
inlinevirtual

Executed on task call.

Parameters
args=>std::vector<std::string> -> used internally

Implements CBuild::Task.

Definition at line 34 of file CBuild_help_task.hpp.

References data, and CBuild::print().

Member Data Documentation

◆ data

std::string CBuild::Help::data = "CBuild help - v13.0\nCommand line options:\n\t `-f` - force recompilation of all files.\n\t `-v` - verbose output, some addition info and some debugging info, mask `--no-cli-out` if used before.\n\t `--no-cli-out` - no output from CBuild at all, mask `-v` if used before.\n\t `-g make` - generate Makefile based on output from CBuild, simly log all executed command and pack it in Makefile syntax, so, sadly, CBuild::fs calls not propagate to Makefile.\n\t `-g ccj` - generate compile_commands.json, use internal command evaluator in CBuild::Toolchain, from the box work only for toolchains, that use standard compiler calling convention, see below.\n\t `-ld <toolchain_name>` - load dependencies of specified target, only for CBuild dependencies.\n\t `-b <toolchain_name>` - build specified target.\n\t `-b all` - build all registered targets\n\t `-r <toolchain_name>` - run specified target.\n\t `-br <toolchain_name>` - build and then run specified target.\n\t `-d <toolchain_name>` - build and then run specified target in debug mode. Now work only with gdb on linux.\n\t `-c <toolchain_name>` - clear all data of specified target.\n\t `-t <task_name>` - run specified task.\n\t `-a <arg>` - set some argument (see it as #define arg, without value). It can be used by ran toolchain or ran task. No preprocessing, simple propagation for user-defined arguments, preserver order in what arguments is specified.\n\t `-pa <arg>` - specify argument for ran app, propagated to app ran by `-r` and `-br`, in `-d` arguments propagates to debugger.\n\t `--rebuild` - rebuild CBuild executable.\n\t `--init` - init CBuild folder structure, not always required.\n\t `--help` - print help message - this information.\n\t `--version` - print curent version of CBuild\n\t `--task-list` - print list of all registered tasks\n\t `--target-list` - print list of all registered targets\n\t `--generator-list` - print list of all registered generators\n\t `--commands-list` - print list of all registered user commands\nCBuild folder structure: \n<project_root>\n |\n | - src : Project sources folder\n | |\n | | - main.cpp : Have main() function of project implemented\n |\n | - scripts\n | |\n | | - main.cpp : Main file of CBuild user scripts, init CBuild and call user init\n | | - user_init.cpp : Implement user init function, have build sript implemented\n | | - user_init.hpp : Header to glue together two .cpp files\n | - cache : CBuild dir for some temporary data\n | |\n | | - headers : Header of included CBuild projects\n | | - libs : .so / .a files of included CBuild projects\n | | - tmp : Directory for temporary runtime data of CBuild \n |\n | - build\n | |\n | | - <toolchain_name>\n | | | - config : Hash storage directory\n | | | |\n | | | | - src.main.meta : Metadata for src/main.cpp\n | | | - objs : Saved .o files of specified target\n | | | - out : Output files of specified target\n | | | - <toolchain_name>.meta : Metadata for a full target\n |\n | - CBuild.run : Main executable of CBuild\nSome useful information: \n Compiler calling convention:: \n\t - All compilations is done in two steps: compilation `<compiler> -c <file> <arguments> -o <object>` and then linking `<linker> <objects> <arguments> -o <output binary>`\n Hasher general requirments: \n\t - All hashers are inherited of CBuild::Hash class. \n\t - Class constructor need to take one argument of type std::string and pass it to a base class. \n\t - Function 'get_files_for_recompilation' need to construct a `lib::map<std::string, std::string>` of source->object mappings of files that need to be recompiled, files and objects array are for one set of files, `objects.at(1)` is an object for a source file at `files.at(1)`. So, this function need to produce a list of files that need to be recompiled and update stored metadata. \n\t - All other function need to return an int value acording to their doxygen docs and also update a coresponding metadata value. \n"
private

Definition at line 30 of file CBuild_help_task.hpp.

Referenced by call().


The documentation for this class was generated from the following file: