Main Content

getIncludePaths

ビルド情報からインクルード パスを取得

説明

paths = getIncludePaths(buildinfo,replaceMatlabroot,includeGroups,excludeGroups) は、ビルド情報に含まれるインクルード ファイル パスの名前を返します。

関数は、引数 buildinfo および replaceMatlabroot を必要とします。オプション引数 includeGroupsexcludeGroups を使用できます。これらのオプション引数を使用すると、関数で返されたインクルード パスから、グループを選択的に含めるか、除外することができます。

excludeGroups を指定して includeGroups を除外する場合は includeGroups にヌル文字ベクトル ('') を指定してください。

すべて折りたたむ

ビルド情報 myBuildInfo からインクルード パスを取得します。

myBuildInfo = RTW.BuildInfo;
addIncludePaths(myBuildInfo,{'/etc/proj/etclib' ... 
   '/etcproj/etc/etc_build' '/common/lib'}, ...
   {'etc' 'etc' 'shared'});
incpaths = getIncludePaths(myBuildInfo,false);
>> incpaths

incpaths = 

    '\etc\proj\etclib'   [1x22 char]    '\common\lib'

ビルド情報 myBuildInfo から、グループ shared に含まれるパスを取得します。

myBuildInfo = RTW.BuildInfo;
addIncludePaths(myBuildInfo,{'/etc/proj/etclib' ...
   '/etcproj/etc/etc_build' '/common/lib'}, ...
   {'etc' 'etc' 'shared'});
incpaths = getIncludePaths(myBuildInfo,false,'shared');
>> incpaths

incpaths = 

    '\common\lib'

入力引数

すべて折りたたむ

生成されたコードのコンパイルとリンクに関する情報を格納する RTW.BuildInfo オブジェクト。

関数が返す出力に MATLAB® ルート定義を含めるかどうかを制御するには replaceMatlabroot 引数を使用します。

指定関数のアクション
trueトークン $(MATLAB_ROOT) を MATLAB インストール フォルダーの絶対パスに置き換えます。
falseトークン $(MATLAB_ROOT) を置き換えません。

例: true

includeGroups 引数を使用するには、myGroups = getGroups(buildInfo) を使用して、利用可能なグループを表示します。

例: ''

excludeGroups 引数を使用するには、myGroups = getGroups(buildInfo) を使用して、利用可能なグループを表示します。

例: ''

出力引数

すべて折りたたむ

ビルド情報に含まれるインクルード ファイルのパス。

バージョン履歴

R2006a で導入