addIncludePaths - Add include paths to build information - MATLAB (original) (raw)
Main Content
Add include paths to build information
Syntax
Description
addIncludePaths([buildinfo](#d126e1900),[paths](#d126e1919),[groups](#d126e1956))
specifies included file paths to add to the build information.
The function requires the buildinfo
and_paths
_ arguments. You can use an optional_groups
_ argument to group your options.
The code generator stores the included file path options in a build information object. The function adds options to the object based on the order in which you specify them.
The function adds the file paths to the compiler search path.
The code generator does not check whether a specified path is valid.
Examples
Add the include path /etcproj/etc/etc_build
to the build information myBuildInfo
.
myBuildInfo = RTW.BuildInfo; addIncludePaths(myBuildInfo,... '/etcproj/etc/etc_build');
Add the include paths /etcproj/etclib
and/etcproj/etc/etc_build
to the build informationmyBuildInfo
and place the files in the group etc
.
myBuildInfo = RTW.BuildInfo; addIncludePaths(myBuildInfo,... {'/etcproj/etclib' '/etcproj/etc/etc_build'},'etc');
Add the include paths /etcproj/etclib
,/etcproj/etc/etc_build
, and /common/lib
to the build information myBuildInfo
. Group the paths /etc/proj/etclib
and /etcproj/etc/etc_build
with the character vector etc
and the path /common/lib
with the character vectorshared
.
myBuildInfo = RTW.BuildInfo; addIncludePaths(myBuildInfo,... {'/etc/proj/etclib' '/etcproj/etc/etc_build'... '/common/lib'}, {'etc' 'etc' 'shared'});
Input Arguments
RTW.BuildInfo
object that contains information for compiling and linking generated code.
You can specify the paths
argument as a character vector, as an array of character vectors, or as a string. If you specify a single path as a character vector, the function uses that path for all files. If you specify the paths
argument as multiple character vectors, for example, '/proj/src'
and '/proj/inc'
, the_paths
_ argument is added to the build information as an array of character vectors.
The function removes duplicate include file path entries with an exact match of a path and file name to a previously defined entry in the build information object.
Example: '/proj/src'
You can specify the groups
argument as a character vector, as an array of character vectors, or as a string. If you specify multiple_groups
_, for example, 'etc' 'etc' 'shared'
, the function relates the groups
to the paths
in order of appearance. For example, the paths
argument'/etc/proj/etclib' '/etcproj/etc/etc_build' '/common/lib'
is an array of character vectors with three elements. The first element is in the 'etc'
group, the second element is in the 'etc'
group, and the third element is in the 'shared'
group.
Example: 'etc' 'etc' 'shared'
Version History
Introduced in R2006a