Main Content
setName
Class: coder.make.BuildTool
Namespace: coder.make
Set build tool name
Syntax
h.setName(name)
Input Arguments
Examples
Get a Default BuildTool and Set Its Properties
The following example code shows setName
in a portion of the
intel_tc.m
file from the Add Custom Toolchains to MATLAB® Coder™ Build Process tutorial:
% ------------------------------ % C Compiler % ------------------------------ tool = tc.getBuildTool('C Compiler'); tool.setName('Intel C Compiler'); tool.setCommand('icl'); tool.setPath(''); tool.setDirective('IncludeSearchPath','-I'); tool.setDirective('PreprocessorDefine','-D'); tool.setDirective('OutputFlag','-Fo'); tool.setDirective('Debug','-Zi'); tool.setFileExtension('Source','.c'); tool.setFileExtension('Header','.h'); tool.setFileExtension('Object','.obj'); tool.setCommandPattern('|>TOOL<| |>TOOL_OPTIONS<| |>OUTPUT_FLAG<||>OUTPUT<|');
Using the getName and setName Methods Interactively
Starting from the Add Custom Toolchains to MATLAB® Coder™ Build Process example, enter the following lines:
tc = coder.make.ToolchainInfo;
tool = tc.getBuildTool('C Compiler');
tool.getName
ans = C Compiler
tool.setName('X Compiler')
tool.getName
ans = X Compiler
Version History
Introduced in R2013a