Main Content

coder.make.BuildConfiguration class

Package: 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.

Construction

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 Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

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
##############################################

Data type: char

Attributes:

GetAccesspublic
SetAccesspublic

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         : 
##############################################

Data type: char

Attributes:

GetAccesspublic
SetAccesspublic

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.

Data type: coder.make.UnorderedList

Attributes:

GetAccesspublic
SetAccesspublic

Methods

addOptionAdd new option
getOptionGet value of option
infoGet information about build configuration
isOptionDetermine if option exists
keysGet all option names
setOptionSet value of option
valuesGet all option values

Copy Semantics

Handle. To learn how handle classes affect copy operations, see Copying Objects.