Main Content


Class: coder.BuildConfig
Namespace: coder

Determine if build context represents specified target


tf = isCodeGenTarget(bldcfg,target)


tf = isCodeGenTarget(bldcfg,target) checks if the code generation target of the build context bldcfg represents the code generation target specified by target.

Input Arguments

expand all

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

Code generation target, specified as a character vector or a cell array of character vectors with one or more of the following values:

'rtw'C/C++ dynamic Library, C/C++ static library, or C/C++ executable
'sfun'S-function (Simulation)

Example: bldcfg.isCodeGenTarget({'sfun','mex'}) checks whether the build context represents an S-function target or a MEX-function target.

Data Types: char | cell

Output Arguments

expand all

Whether the build context represents the code generation target, returned as either true(1) or false(0). If you specify more than one value for target, the function returns true(1) if the build context represents any of the code generation targets.

Data Types: logical

Version History

Introduced in R2013b

See Also