Main Content

coder.ExternalDependency.updateBuildInfo

Class: coder.ExternalDependency
Namespace: coder

Configure compiler flags and other build options for use by the code generator

Syntax

coder.ExternalDependency.updateBuildInfo(buildInfo,bldcfg)

Description

coder.ExternalDependency.updateBuildInfo(buildInfo,bldcfg) is a static method that you can use to pass compiler flags and other build options to the code generator. The code generator invokes this method to determine how to build your code after code generation. This method takes as input the build information object buildInfo and the build context object bldcfg and can use the methods of these objects to access the build information and the build context, respectively.

To use coder.ExternalDependency.updateBuildInfo, follow these steps:

  1. Create a custom class that inherits from coder.ExternalDependency.

  2. Implement coder.ExternalDependency.updateBuildInfo in your custom class. Modify the buildInfo object to specify compiler flags, custom includes, custom libraries, and other build information.

  3. Use your custom class or any of its methods in a MATLAB® function for which you generate code.

  4. During code generation, the code generator invokes the coder.ExternalDependency.updateBuildInfo method for your custom class.

Note

When the code generator invokes the coder.ExternalDependency.updateBuildInfo method for a subclass, it also invokes the coder.ExternalDependency.updateBuildInfo methods for all classes from which the subclass inherits. The code generator invokes the coder.ExternalDependency.updateBuildInfo method for each class in the class hierarchy exactly once.

Input Arguments

expand all

Build information, specified as a handle.

Build context during code generation, specified as a coder.BuildConfig object. Use coder.BuildConfig methods to get information about the build context.

Limitations

  • The build information method AddIncludeFiles has no effect in a coder.ExternalDependency.updateBuildInfo method.

More About

expand all

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2013b

expand all