| Real-Time Workshop® | ![]() |
Compiler options from model's build information
options=getCompileFlags(buildinfo, includeGroups, excludeGroups)
includeGroups and excludeGroups are optional.
Build information returned by RTW.BuildInfo.
A character array or cell array of character arrays that specifies groups of compiler flags you want the function to return.
A character array or cell array of character arrays that specifies groups of compiler flags you do not want the function to return.
Compiler options stored in the model's build information.
The getCompileFlags function returns compiler options stored in the model's build information. Using optional includeGroups and excludeGroups arguments, you can selectively include or exclude groups of options the function returns.
If you choose to specify excludeGroups and omit includeGroups, specify a null string ('') for includeGroups.
Get all compiler options stored in build information myModelBuildInfo.
myModelBuildInfo = RTW.BuildInfo;
addCompileFlags(myModelBuildInfo, {'-Zi -Wall' '-O3'},...
{'Debug' 'MemOpt'});
compflags=getCompileFlags(myModelBuildInfo);
compflags
compflags =
'-Zi -Wall' '-O3'Get the compiler options stored with the group name Debug in build information myModelBuildInfo.
myModelBuildInfo = RTW.BuildInfo;
addCompileFlags(myModelBuildInfo, {'-Zi -Wall' '-O3'},...
{'Debug' 'MemOpt'});
compflags=getCompileFlags(myModelBuildInfo, 'Debug');
compflags
compflags =
'-Zi -Wall'Get all compiler options stored in build information myModelBuildInfo, except those with the group name Debug.
myModelBuildInfo = RTW.BuildInfo;
addCompileFlags(myModelBuildInfo, {'-Zi -Wall' '-O3'},...
{'Debug' 'MemOpt'});
compflags=getCompileFlags(myModelBuildInfo, '', 'Debug');
compflags
compflags =
'-O3'getDefines, getLinkFlags
Programming a Post Code Generation Command
![]() | RTW.getBuildDir | getDefines | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |