Skip to content

cpp

compile_to_executable

compile_to_executable(src_file, dst_file_name=None, static_lib=None, dynamic_lib=None)

Compile a C++ source file to an executable file.

Parameters:

Name Type Description Default
src_file str | FileArtifact

The source file to compile.

required
dst_file_name str | None

The name of the execuable file to create. If None, the execuable file will be created in the current build directory with the default name given to an executable by the current compiler.

None
static_lib FileArtifact | None

[optional] A static library to link with the executable.

None
dynamic_lib FileArtifact | None

[optional] A dynamic library to link with the executable.

None

compile_to_object

compile_to_object(src_file, dst_file_name=None)

Compile a C++ source file to an object file.

Parameters:

Name Type Description Default
src_file str | FileArtifact

The source file to compile.

required
dst_file_name str | None

The name of the object file to create. If None, the object file will be created in the current build directory with a name based on the source file name, with the appropriate extension for an object file on this operating system.

None
link_library(object_files, dst_file_name)

Link object files into a static or dynamic library.

Parameters:

Name Type Description Default
object_files list

The object files to link.

required
dst_file_name str

The name of the library to create.

required

select_abstract_tool

select_abstract_tool(tool_id, setting_name, abstract_cls, min_version=None, max_version=None)

Request the use of the specified type of tool in the specified version range.

Parameters:

Name Type Description Default
tool_id str

The id of the compiler to use.

required
min_version str | None

The minimum version of the compiler to use.

None
max_version str | None

The maximum version of the compiler to use.

None

select_compiler

select_compiler(tool_id, min_version=None, max_version=None)

Request the use of the specified compiler in the specified version range.

Parameters:

Name Type Description Default
tool_id str

The id of the compiler to use.

required
min_version str | None

The minimum version of the compiler to use.

None
max_version str | None

The maximum version of the compiler to use.

None

select_tool

select_tool(tool_id, setting_name, expected_cls, min_version=None, max_version=None)

Request the use of the specified type of tool in the specified version range.

Parameters:

Name Type Description Default
tool_id str

The id of the compiler to use.

required
min_version str | None

The minimum version of the compiler to use.

None
max_version str | None

The maximum version of the compiler to use.

None