メインコンテンツ

setFileExtension

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

FileExtensions 内の名前付きファイル タイプへのファイル拡張子の設定

構文

h.setFileExtension(name,value)

説明

h.setFileExtension(name,value) は、coder.make.BuildTool.FileExtensions 内にある名前付きファイル タイプの拡張子の値を設定します。

入力引数

すべて展開する

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

例: tool

ファイル タイプ名。文字ベクトルとして指定します。

データ型: char

ファイル拡張子の値。文字ベクトルとして指定します。

データ型: char

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

以下のコードの例では、MATLAB® Coder™ ビルド プロセスへのカスタム ツールチェーンの追加チュートリアルの intel_tc.m ファイルの一部にある setFileExtension を説明します。

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

setFileExtension の対話形式での使用

tc = coder.make.ToolchainInfo;
tool = tc.getBuildTool('C Compiler');
blditm = coder.make.BuildItem('CD','.cd')
bldtm = 

	Macro  : CD
	Value : .cd
tool.addFileExtension('SourceX',blditm)
value = tool.getFileExtension('SourceX')
value  = 

.cd
tool.setFileExtension('SourceX','.ef')
value = tool.getFileExtension('SourceX')
value  = 

.ef

バージョン履歴

R2013a で導入