setFileExtension
クラス: coder.make.BuildTool
名前空間: coder.make
FileExtensions
内の名前付きファイル タイプへのファイル拡張子の設定
構文
h.setFileExtension(name,value)
説明
入力引数
例
既定のビルド ツールの取得およびそのプロパティの設定
以下のコードの例では、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 で導入