Class: coder.make.BuildTool
Package: coder.make
Set path and macro of build tool in Path
h.setPath(btpath,btmacro)
sets
the path and macro of the build tool in coder.make.BuildTool.Paths.h
.setPath(btpath
,btmacro
)
The following example code shows setPath
in a portion of the
intel_tc.m
file from the Adding a Custom Toolchain 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<|');
This example shows example inputs and outputs for the methods in a MATLAB® Command Window:
Enter the following lines:
tc = coder.make.ToolchainInfo;
tool = tc.getBuildTool('C Compiler');
tool.getPath
ans = ''
tool.getPath('macro')
ans = CC_PATH
tool.setPath('/gcc')
tool.Path
ans = Macro : CC_PATH Value : /gcc