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

#include <cross_compile.hpp>

Classes

class  ToolData
 Internal toolchain data. More...
 

Public Member Functions

 CrossCompiler (std::string id, std::string name)
 Create new cross-compilation collection.
 
void add_arch_tool (std::string id, CBuild::Toolchain *tool)
 Create new architecture dependant tool.
 
void add_arch_tool (std::string id)
 Create new architecture dependant tool, toolchain instance will be created.
 
CBuild::Toolchainget_arch_tool (std::string id)
 Get toolchain for specific arch.
 
void perform_registry ()
 Register all internal toolchains.
 
CBuild::Toolchainget_global_config ()
 Get global configuration (for compatibility reasons returns CBuild::Toolchain* to config)
 
void apply_global_config ()
 Load global configuration data into local, per-toolchain, configuration.
 
void set_default_tool (std::string arch)
 Set default toolchain.
 
std::vector< std::string > get_toolchain_list ()
 Get list of sub-toolchains in this collection (skips config and meta-toolchain)
 
 ~CrossCompiler ()
 Destructor for this class.
 

Protected Attributes

std::vector< CBuild::CrossCompiler::ToolDatatoolchain_list
 List of internal toolchains.
 
CBuild::Toolchainmeta_config
 Global configuration.
 
CBuild::Toolchainmeta_toolchain
 Meta-toolchain fot this group.
 
std::string meta_id
 Id of this group.
 
std::string meta_name
 Output name for this group.
 

Detailed Description

Definition at line 32 of file cross_compile.hpp.

Constructor & Destructor Documentation

◆ CrossCompiler()

CBuild::CrossCompiler::CrossCompiler ( std::string id,
std::string name )

Create new cross-compilation collection.

Parameters
id=> std::string -> Collection id
name=> std::string -> Collection output name

Definition at line 308 of file cross_compile.cpp.

References meta_config, meta_id, meta_name, and meta_toolchain.

◆ ~CrossCompiler()

CBuild::CrossCompiler::~CrossCompiler ( )
inline

Destructor for this class.

Definition at line 122 of file cross_compile.hpp.

References meta_config, meta_toolchain, and toolchain_list.

Member Function Documentation

◆ add_arch_tool() [1/2]

void CBuild::CrossCompiler::add_arch_tool ( std::string id)

Create new architecture dependant tool, toolchain instance will be created.

Parameters
id=> std::string -> Id of tool

Definition at line 341 of file cross_compile.cpp.

◆ add_arch_tool() [2/2]

void CBuild::CrossCompiler::add_arch_tool ( std::string id,
CBuild::Toolchain * tool )

Create new architecture dependant tool.

Parameters
id=> std::string -> Id of tool
tool=> CBuild::Toolchain* -> Preconfigured toolchain

Definition at line 335 of file cross_compile.cpp.

References CBuild::Toolchain::set_id(), and CBuild::Toolchain::set_name().

◆ apply_global_config()

void CBuild::CrossCompiler::apply_global_config ( )

Load global configuration data into local, per-toolchain, configuration.

Definition at line 353 of file cross_compile.cpp.

◆ get_arch_tool()

CBuild::Toolchain * CBuild::CrossCompiler::get_arch_tool ( std::string id)

Get toolchain for specific arch.

Parameters
id=> std::string -> Id of needed toolchain
Returns
CBuild::Toolchain* -> Toolchain pointer

Definition at line 321 of file cross_compile.cpp.

Referenced by CBuild::MetaToolchain::call(), CBuild::MetaToolchain::clear(), CBuild::MetaToolchain::debug(), CBuild::MetaToolchain::load_project_deps(), and CBuild::MetaToolchain::run().

◆ get_global_config()

CBuild::Toolchain * CBuild::CrossCompiler::get_global_config ( )

Get global configuration (for compatibility reasons returns CBuild::Toolchain* to config)

Returns
CBuild::Toolchain* -> Configuration class

Definition at line 329 of file cross_compile.cpp.

◆ get_toolchain_list()

std::vector< std::string > CBuild::CrossCompiler::get_toolchain_list ( )

Get list of sub-toolchains in this collection (skips config and meta-toolchain)

Returns
std::vector<std::string> -> List of intel toolchain id's

Definition at line 314 of file cross_compile.cpp.

Referenced by CBuild::MetaToolchain::call(), CBuild::MetaToolchain::clear(), CBuild::MetaToolchain::debug(), CBuild::MetaToolchain::load_project_deps(), and CBuild::MetaToolchain::run().

◆ perform_registry()

void CBuild::CrossCompiler::perform_registry ( )

Register all internal toolchains.

Definition at line 347 of file cross_compile.cpp.

References CBuild::Registry::RegisterTarget().

◆ set_default_tool()

void CBuild::CrossCompiler::set_default_tool ( std::string arch)

Set default toolchain.

Parameters
arch=> std::string -> Id of default toolchain

Definition at line 332 of file cross_compile.cpp.

Member Data Documentation

◆ meta_config

CBuild::Toolchain* CBuild::CrossCompiler::meta_config
protected

Global configuration.

Definition at line 50 of file cross_compile.hpp.

Referenced by CrossCompiler(), and ~CrossCompiler().

◆ meta_id

std::string CBuild::CrossCompiler::meta_id
protected

Id of this group.

Definition at line 58 of file cross_compile.hpp.

Referenced by CrossCompiler().

◆ meta_name

std::string CBuild::CrossCompiler::meta_name
protected

Output name for this group.

Definition at line 62 of file cross_compile.hpp.

Referenced by CrossCompiler().

◆ meta_toolchain

CBuild::Toolchain* CBuild::CrossCompiler::meta_toolchain
protected

Meta-toolchain fot this group.

Definition at line 54 of file cross_compile.hpp.

Referenced by CrossCompiler(), and ~CrossCompiler().

◆ toolchain_list

std::vector<CBuild::CrossCompiler::ToolData> CBuild::CrossCompiler::toolchain_list
protected

List of internal toolchains.

Definition at line 46 of file cross_compile.hpp.

Referenced by ~CrossCompiler().


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