Main Content

setPath

クラス: coder.make.BuildTool
名前空間: coder.make

Path 内のビルド ツールのパスおよびマクロの設定

構文

h.setPath(btpath,btmacro)

説明

h.setPath(btpath,btmacro) は、coder.make.BuildTool.Paths 内にあるビルド ツールのパスおよびマクロを設定します。

入力引数

すべて展開する

coder.make.BuildToolオブジェクトのオブジェクト ハンドル。変数で指定します。

例: tool

BuildTool オブジェクトのパス。スカラーとして返されます。

データ型: char

BuildTool オブジェクトのパスのマクロ。スカラーとして返されます。

データ型: char

既定のビルド ツールの取得およびそのプロパティの設定

以下のコードの例では、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 で導入