setPath
クラス: coder.make.BuildTool
名前空間: coder.make
Path
内のビルド ツールのパスおよびマクロの設定
構文
h.setPath(btpath,btmacro)
入力引数
例
既定のビルド ツールの取得およびそのプロパティの設定
以下のコードの例では、MATLAB® Coder™ ビルド プロセスへのカスタム ツールチェーンの追加チュートリアルの intel_tc.m
ファイルの一部にある setPath
を説明します。
% ------------------------------ % 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<|');
getPath および setPath メソッドの対話形式での使用
この例では、MATLAB® コマンド ウィンドウでの、これらのメソッドに対する入力例および出力例を説明します。
以下の行を入力します。
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
バージョン履歴
R2013a で導入