isCodeGenTarget

Class: coder.BuildConfig
Package: coder

Determine if build configuration represents specified target

Syntax

tf = bldcfg.isCodeGenTarget(target)

Description

tf = bldcfg.isCodeGenTarget(target) returns true (1) if the code generation target of the current build configuration represents the code generation target specified by target. Otherwise, it returns false (0).

Input Arguments

bldcfg

coder.BuildConfig object.

target

Code generation target specified as a character vector or cell array of character vectors.

SpecifyFor code generation target
'rtw' C/C++ dynamic Library, C/C++ static library, or C/C++ executable
'sfun'S-function (Simulation)
'mex'MEX-function

Specify target as a cell array of character vectors to test if the code generation target of the build configuration represents one of the targets specified in the cell array.

For example:

...
mytarget = {'sfun','mex'};
tf = bldcfg.isCodeGenTarget(mytarget);
...
tests whether the build context represents an S-function target or a MEX-function target.

Output Arguments

tf

The value is true (1) if the code generation target of the build configuration represents the code generation target specified by target. Otherwise, the value is false (0).

See Also