Main Content

getIncludePaths

Get include paths from build information

Description

example

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.

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

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

To use the includeGroups argument, view available groups by using myGroups = getGroups(buildInfo).

Example: ''

To use the excludeGroups argument, view available groups by using myGroups = getGroups(buildInfo).

Example: ''

Output Arguments

collapse all

Introduced in R2006a