メインコンテンツ

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

findIncludeFiles

Find and add include (header) files to build information

説明

findIncludeFiles(buildInfo,extensions,Name,Value) searches for and adds include files to the build information.

Use the findIncludeFiles function to:

  • Search for include files in source and include paths from the build information.

  • Apply the optional extensions argument to specify file name extension patterns for search.

  • Add the found files with their full paths to the build information.

  • Delete duplicate include file entries from the build information.

To ensure that findIncludeFiles finds header files, add their paths to buildInfo by using the addIncludePaths function.

メモ

findIncludeFiles can modify the buildInfo argument. These modifications are reflected in further use of buildInfo, including in subsequent calls to findIncludeFiles.

すべて折りたたむ

Find include files with file name extension .h that are in the build information, myBuildInfo. Add the full paths for these files to the build information. View the include files from the build information.

myBuildInfo = RTW.BuildInfo;
addSourcePaths(myBuildInfo,{fullfile(pwd,...
   'mycustomheaders')},'myheaders');
findIncludeFiles(myBuildInfo);
headerfiles = getIncludeFiles(myBuildInfo,true,false);
>> headerfiles

headerfiles = 

    'W:\work\mycustomheaders\myheader.h'

入力引数

すべて折りたたむ

Object provides information for compiling and linking generated code.

To specify files for the search, the character vectors or strings in the extensions argument:

  • Must start with an asterisk immediately followed by a period (*.)

  • Can include a combination of alphanumeric and underscore (_) characters

例: '*.h' '*.hpp' '*.x*'

名前と値の引数

すべて折りたたむ

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

例: minimalHeaders=false,ignoreParseError=true

Option to include only minimally required header files, specified as true or false.

Based on the value of minimalHeaders, findIncludeFiles determines which header files to include and updates buildInfo accordingly.

  • If minimalHeaders is true, findIncludeFiles analyzes the source code to determine which header files are required to build the code, and only these header files are included.

  • If minimalHeaders is false, all header files found on the include paths specified by buildInfo are included.

例: minimalHeaders=false

If false, terminate on parse errors.

If true, do not terminate on parse errors.

例: ignoreParseError=true

バージョン履歴

R2006b で導入