Main Content

coder.make.BuildConfiguration.getOption

Class: coder.make.BuildConfiguration
Namespace: coder.make

Get value of option

Syntax

OptionValue = h.getOption(OptionName)

Description

OptionValue = h.getOption(OptionName) returns the value and optional macro name of a build configuration option.

Input Arguments

expand all

BuildConfiguration handle, specified as a coder.make.BuildConfiguration object.

Example: h

Name of option, specified as a character vector. Choose a new option name.

Example: 'faster2'

Data Types: char

Output Arguments

expand all

Value of the option, returned as a coder.make.BuildItem object that contains a value and an optional macro name.

Examples

Using the Option-Related Methods Interactively

tc = coder.make.ToolchainInfo;
cfg = tc.getBuildConfiguration('Faster Builds');
cfg.isOption('X Compiler')
ans  = 

     0
bi = coder.make.BuildItem('WV','wrongvalue')
bi = 

	Macro  : WV
	Value : wrongvalue
cfg.addOption('X Compiler',bi);
value = cfg.getOption('X Compiler')
value = 

	Macro  : WV
	Value : wrongvalue
cfg.setOption('X Compiler','rightvalue');
value = cfg.getOption('X Compiler')
value = 

	Macro  : WV
	Value : rightvalue

Version History

Introduced in R2013a