Main Content

coder.make.BuildConfiguration Class

Namespace: coder.make

Represent build configuration

Description

A build configuration contains information on how to build source code and binaries.

Give each build configuration a unique name that you can use to reference or access it, such as ‘Faster Builds’.

A build configuration contains options with values. Each option maps to a build tool in the ToolchainInfo object that uses the build configuration.

For example, a build configuration can contain options for the following build tools in coder.make.ToolchainInfo:

  • C Compiler

  • C++ Compiler’

  • Linker

  • Shared Library Linker

  • Archiver

The value of each option can vary from one build configuration to another. For example, the “Faster Runs” build configuration can have compiler options that include optimization flags, while the “Debug” build configuration can have compiler options that include a symbolic debug flag.

The coder.make.BuildConfiguration class is a handle class.

Creation

ConfigObj = coder.make.BuildConfiguration(ConfigName,{Name,Value,...})

Input Arguments

expand all

Name of build configuration, specified as a character vector.

Example: 'Faster Builds II'

Data Types: char

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Name of option, specified as a character vector.

Data Types: char

Value of option, specified as a character vector.

Data Types: char

Output Arguments

expand all

Object handle for configuration, returned as a variable.

Data Types: char

Properties

expand all

A brief description of the build configuration. The MATLAB® Coder™ software displays this description in the project build settings, on the Hardware tab, below the Build Configuration parameter.

You can assign a description to this property after you create the BuildConfiguration object.

config.Description = 'BldConfigDescription'
config = 

##############################################
# Build Configuration : BldConfigName
# Description         : BldConfigDescription
##############################################

Attributes:

GetAccess
public
SetAccess
public

Data Types: char

The name of the build configuration.

You can assign a name to this property when you create a BuildConfiguration object.

config = coder.make.BuildConfiguration ...
('BldConfigName',{'optiona','1','optionb','2','optionc','3'})

You can also assign a name to this property after you create a BuildConfiguration object.

config.Name = 'BldConfigName'

Both approaches produce the same result.

config = 

##############################################
# Build Configuration : BldConfigName
# Description         : 
##############################################

Attributes:

GetAccess
public
SetAccess
public

Data Types: char

A list of options or settings for a specific build configuration. This list contains name-value pairs. The Options property has an option for each coder.make.BuildTool object in coder.make.Toolchain.BuildTools. For example, Options has a C Compiler option for the C Compiler build tool.

Attributes:

GetAccess
public
SetAccess
public

Data Types: coder.make.UnorderedList

Methods

expand all

Version History

Introduced in R2013a