h.addAttribute(att_name, att_value)
h.addAttribute(att_name)
adds
a custom attribute with the specified name to h
.addAttribute(att_name
, att_value
)coder.make.ToolchainInfo.Attributes
.
Use att_value
to override the default attribute
value, true
.
adds
an attribute and initializes its value to h
.addAttribute(att_name
)true
.
All attributes are optional. You can add attributes for the toolchain to use. The following attributes are used during the build process:
TransformPathsWithSpaces
(value
= True/False) When enabled, this method looks for spaces in paths
to source files, include files, include paths, additional source paths,
object paths, and prebuild object paths, library paths, and within
MACROS used in any of the stated paths. If any path contains spaces,
an alternate version of the path is returned. For long
path names or paths with spaces, this returns the '~' version on Windows. On
UNIX platforms, paths with spaces are returned with the spaces escaped.
RequiresBatchFile
: (value = True/False)
When enabled, creates a batch file that runs the make file that is
generated.
SupportsUNCPaths
: (value = True/False)
Looks in the same locations for UNC paths (Windows® only, ignored
on Linux®/Mac platforms). If there is a drive mapped to the
UNC the path is pointing to, then paths that are UNC paths will have
a mapped drive letter put in place.
SupportsDoubleQuotes
: (not defined
or value = True) Wraps each path in double quotes if they contain
spaces.
RequiresCommandFile
: (not defined
or value = True) This is used to handle long archiver/linker lines
in Windows. If specified the make file replace a long object list
with a call to a command file.
h.Attribute
ans = # ------------------- # "Attribute" List # ------------------- (empty)
h.addAttribute('TransformPathsWithSpaces',false) h.getAttribute('TransformPathsWithSpaces')
ans = 0
h.addAttribute('CustomAttribute')
h.Attributes
ans = # ------------------- # "Attributes" List # ------------------- CustomAttribute = true
The intel_tc.m
file from the Adding a Custom Toolchain 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