Main Content

removeIncludePaths

Remove include paths from build information

Since R2023b

Description

removeIncludePaths(buildinfo, pathsToRemove) removes the specified include file paths from the build information.

example

removeIncludePaths(buildinfo, pathsToRemove, groups) removes the include file paths in the specified groups from the build information.

example

Examples

collapse all

Add the include path /etcproj/etc/etc_build to the build information object myBuildInfo.

myBuildInfo = RTW.BuildInfo;
addIncludePaths(myBuildInfo,...
                '/etcproj/etc/etc_build');

To remove the include path from the build information, run:

removeIncludePaths(myBuildInfo,...
   '/etcproj/etc/etc_build');

Add the include paths /etcproj/etclib, /etcproj/etc/etc_build, /common/lib1, and /common/lib2 to the build information object myBuildInfo. Associate the etc group with the paths /etc/proj/etclib and /etcproj/etc/etc_build and the shared group with the paths /common/lib1 and /common/lib2.

myBuildInfo = RTW.BuildInfo;
addIncludePaths(myBuildInfo,...
               {'/etc/proj/etclib' '/etcproj/etc/etc_build' ...
                '/common/lib1' '/common/lib2'}, ...
               {'etc' 'etc' 'shared' 'shared'});

To remove /etcproj/etclib from the build information if the path is in the shared group , run:

removeIncludePaths(myBuildInfo, '/etcproj/etclib','shared');

Or, to remove the include file paths in both groups, run:

removeIncludePaths(myBuildInfo, '', {'etc' 'shared'});

Input Arguments

collapse all

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

Example: myBuildInfo

Specify include paths that you want to remove from the build information.

Example: '/proj/src'

Specify groups of include paths that you want to remove from the build information.

Example: {'etc' 'shared'}

Version History

Introduced in R2023b