RTW.BuildInfo

Provide information for compiling and linking generated code

Description

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

Creation

Description

example

buildInformation = RTW.BuildInfo returns a build information object. You can use the object to specify information for compiling and linking generated code. For example:

  • Compiler options

  • Preprocessor identifier definitions

  • Linker options

  • Source files and paths

  • Include files and paths

  • Precompiled external libraries

Object Functions

addCompileFlagsAdd compiler options to model build information
addDefinesAdd preprocessor macro definitions to model build information
addIncludeFilesAdd include files to model build information
addIncludePathsAdd include paths to model build information
addLinkFlagsAdd link options to model build information
addLinkObjectsAdd link objects to model build information
addNonBuildFilesAdd nonbuild-related files to model build information
addSourceFilesAdd source files to model build information
addSourcePathsAdd source paths to model build information
addTMFTokensAdd template makefile (TMF) tokens to model build information
findBuildArgFind a specific build argument in model build information
findIncludeFilesFind and add include (header) files to model build information
getBuildArgsGet build arguments from model build information
getCompileFlagsGet compiler options from model build information
getDefinesGet preprocessor macro definitions from model build information
getFullFileListGet list of files from model build information
getIncludeFilesGet include files from model build information
getIncludePathsGet include paths from model build information
getLinkFlagsGet link options from model build information
getNonBuildFilesGet nonbuild-related files from model build information
getSourceFilesGet source files from model build information
getSourcePathsGet source paths from model build information
setTargetProvidesMainDisable inclusion of code generator provided (generated or static) main.c source file during model build
updateFilePathsAndExtensionsUpdate files in model build information with missing paths and file extensions
updateFileSeparatorUpdate file separator character for file lists in model build information

Examples

Retrieve Build Information Object

When you build generated code, the build process stores an RTW.BuildInfo object in the buildInfo.mat file. To retrieve the object, from the code generation folder that contains the buildInfo.mat file, run:

bi=load('buildInfo.mat');
bi.buildInfo

The object contains build information. For example:

ans = 

  BuildInfo with properties:

            ModelHandle: 1.2207e-04
              ModelName: 'myAircraftExample'
                 Viewer: []
                 Tokens: [29×1 RTW.BuildInfoKeyValuePair]
              BuildArgs: [14×1 RTW.BuildInfoKeyValuePair]
               MakeVars: []
               MakeArgs: ''
    TargetPreCompLibLoc: ''
        TargetLibSuffix: ''
      InstallDirmexopts: ''
       TemplateMakefile: ''
                LinkObj: [1×1 RTW.BuildInfoLinkObj]
              ModelRefs: []
                 SysLib: [1×1 RTW.BuildInfoModules]
             ReportInfo: [1×1 rtw.report.ReportInfo]
                   Maps: [1×1 struct]
             BuildTools: [1×1 coder.internal.BuildTools]
                Options: [1×1 RTW.BuildInfoOptions]
                    Inc: [1×1 RTW.BuildInfoModules]
                    Src: [1×1 RTW.BuildInfoModules]
                  Other: [1×1 RTW.BuildInfoModules]
                   Path: []
               Settings: [1×1 RTW.BuildInfoSettings]
           DisplayLabel: 'Build Info'
                  Group: ''

Introduced in R2006a