Main Content


Class: coder.make.BuildConfiguration
Package: coder.make

Add new option


h.addOption(OptionName, buildItemHandle)


h.addOption(OptionName, buildItemHandle) adds an option to coder.make.BuildConfiguration.Options.


Before using addOption, create a coder.make.BuildItem object to use as the second argument.

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

BuildItem handle, specified as a coder.make.BuildItem object that contains an option value.

Example: bi


Using the Option-related methods interactively

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

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