Main Content

getIncludePaths

Get include paths from build information

Description

paths = getIncludePaths(buildinfo,replaceMatlabroot,includeGroups,excludeGroups) returns the names of include file paths from the build information.

The function requires the buildinfo and replaceMatlabroot arguments. You can use optional includeGroups and excludeGroups arguments. These optional arguments let you include or exclude groups selectively from the include paths returned by the function.

If you choose to specify excludeGroups and omit includeGroups, specify a null character vector ('') for includeGroups.

example

Examples

collapse all

Get the include paths from the build information, 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'

Get the paths in group shared from the build information, myBuildInfo.

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'

Input Arguments

collapse all

RTW.BuildInfo object that contains information for compiling and linking generated code.

Use the replaceMatlabroot argument to control whether the function includes the MATLAB® root definition in the output that it returns.

SpecifyFunction Action
trueReplaces the token $(MATLAB_ROOT) with the absolute path for your MATLAB installation folder.
falseDoes not replace the token $(MATLAB_ROOT).

Example: true

Group names of include paths to include in the return from the function, specified as a string or a cell array of character vectors. To view the group name of an include path, access the Group property of the corresponding object.

Example: ''

Group names of include paths to exclude from the return from the function, specified as a string or a cell array of character vectors. To view the group name of an include path, access the Group property of the corresponding object.

Example: ''

Output Arguments

collapse all

Paths of include files from the build information.

Version History

Introduced in R2006a