addAttribute
Class: coder.make.ToolchainInfo
Namespace: coder.make
Add custom attribute to Attributes
Syntax
h.addAttribute(Name,Value)
Description
adds a custom attribute with the specified name and value to h
.addAttribute(Name,Value
)coder.make.ToolchainInfo.Attributes
. If you do not specify a value, the function
initializes the attribute to true
(default).
All attributes are optional. The toolchain uses the attributes during the build process.
Input Arguments
Examples
Add an Attribute and Initialize Its Value, Overriding the Default Value
h.Attribute
ans = # ------------------- # "Attribute" List # ------------------- (empty)
h.addAttribute('TransformPathsWithSpaces',false) h.getAttribute('TransformPathsWithSpaces')
ans = 0
Add Attribute Without Overriding Its Default Value
h.addAttribute('CustomAttribute')
h.Attributes
ans = # ------------------- # "Attributes" List # ------------------- CustomAttribute = true
Add Attribute Using Toolchain Definition File
The intel_tc.m
file from the Add Custom Toolchains to MATLAB® Coder™ Build Process example defines the following custom
attributes:
tc.addAttribute('TransformPathsWithSpaces'); tc.addAttribute('RequiresCommandFile'); tc.addAttribute('RequiresBatchFile');
To see the property values from that example in the MATLAB Command Window, enter:
h = intel_tc; h.Attributes
ans = # ------------------- # "Attributes" List # ------------------- RequiresBatchFile = true RequiresCommandFile = true TransformPathsWithSpaces = true
Version History
Introduced in R2013a