Main Content

setCommandPattern

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

ビルド ツールのコマンド パターンの設定

構文

h.setCommandPattern(commandpattern);

説明

h.setCommandPattern(commandpattern); は、coder.make.ToolchainInfo.BuildTools 内の特定の coder.make.BuildTool オブジェクトのコマンド パターンを設定します。

入力引数

すべて展開する

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

例: tool

ビルド ツールを実行するために BuildTool で使用可能なコマンドおよびオプションのパターン。文字ベクトルとして指定します。

コマンド要素の左右の区切り記号として |> および <| を使用します。2 つのコマンド要素間にスペースが必要な場合は、<| および |> の区切り記号の間にスペース文字を使用します。以下に例を示します。

  • |>TOOL<| |>TOOL_OPTIONS<| では 2 つのコマンド要素間にスペースが必要です。

  • |>OUTPUT_FLAG<||>OUTPUT<| では 2 つのコマンド要素間のスペースは不要です。

データ型: char

MATLAB® Coder™ ビルド プロセスへのカスタム ツールチェーンの追加intel_tc.m ファイルは以下の行を使用して、コマンド パターンを含む BuildTool オブジェクトの 1 つを取得し、更新します。

% ------------------------------
% 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<|');

バージョン履歴

R2013a で導入