Main Content

Build configuration

Build configuration defined by toolchain

Model Configuration Pane: Code Generation

Description

The Build configuration parameter specifies compiler optimization or debug settings for the specified toolchain.

Dependencies

This parameter appears when you configure the model for toolchain-based code generation by using one of the following:

Settings

Depends on your configuration for toolchain-based code generation.

If you use a CMake toolchain definition, the parameter provides these options:

  • Release – Enables optimizations.

  • Debug – Disables optimizations and generates debug symbols.

  • RelWithDebInfo – Enables optimizations and generates debug symbols.

  • MinSizeRel – Optimizes for size and does not generate debug symbols.

  • Specify – Enables you to specify toolchain details through the CMake Configure and CMake Build fields.

For a customized CMake toolchain definition, the parameter can provide additional options, which you specify through the SupportedBuildTypes property of the target.CMakeBuilder class. The behavior of the custom build configuration is defined by a CMake toolchain file that you specify through the ToolchainFile property of the target.CMakeBuilder class. For more information, see Create Custom CMake Toolchain Definition and Use target.CMakeBuilder to Configure CMake Build.

If you use a makefile-based toolchain approach, the parameter provides these options:

  • Faster Builds – Optimizes for shorter build times.

  • Faster Runs – Optimizes for executable program that runs faster.

  • Debug – Optimizes for debugging.

  • Specify – Displays a table of tools with editable options. Use the table to customize settings for the current model. See Toolchain details.

For a makefile-based toolchain, the parameter can provide additional options, which you specify by using the addBuildConfiguration method of the coder.make.ToolchainInfo object.

Changing the setting of Build configuration to Specify, changes the Toolchain value Automatically locate an installed toolchain (default) to the value of the toolchain that was located.

Changing Build configuration from Specify to another value does not change the Toolchain value.

Recommended Settings

ApplicationSetting
DebuggingDebug
TraceabilityNo impact
EfficiencyFaster Runs
Safety precautionNo impact

Programmatic Use

Parameter: BuildConfiguration
Type: character vector
Value: 'Release' | 'RelWithDebInfo' | 'MinSizeRel' | 'Faster Builds' | 'Faster Runs' | 'Debug' | 'Specify'
Default: 'Release' or 'Faster Builds'

Version History

Introduced in R2013b