Main Content

validate

Class: coder.make.ToolchainInfo
Namespace: coder.make

Validate toolchain

Syntax

h.validate
h.validate('setup','cleanup')
[sflag, report] = h.validate (___)

Description

h.validate validates the toolchain object and generates errors if properties are incorrectly defined.

h.validate('setup','cleanup') evaluates the setup callbacks (ShellSetup and MATLABSetup) of the toolchain object before validation and evaluates the cleanup callbacks (ShellCleanup and MATLABCleanup) of the toolchain object after validation. The Configuration Parameters dialog box executes this version of validate when validating the toolchain.

[sflag, report] = h.validate (___) validates the toolchain object, generates errors if properties are incorrectly defined, and returns optional output arguments.

Input Arguments

expand all

A coder.make.ToolchainInfo object, specified using an object handle, such as h. To create h, enter h = coder.make.ToolchainInfo in a MATLAB® Command Window.

Evaluates setup for the toolchain.

Evaluates cleanup for the toolchain.

Output Arguments

expand all

Validation response, returned as a numeric value. If any of the property values that the method checks are invalid, the method returns 0. Otherwise, it returns 1.

Information about properties that are invalid. Only available when the method returns 0.

Examples

expand all

If you try to validate a toolchain before build tools are defined, validate produces an error.

h = coder.make.ToolchainInfo;
[sflag,report] = h.validate
Error using coder.make.ToolchainInfo/validate
Validation error(s):
The 'Command' parameter for the build tool named 'C Compiler' 
in the toolchain '' cannot be an empty character vector.
The 'Command' parameter for the build tool named 'Linker' 
in the toolchain '' cannot be an empty character vector.
The 'Command' parameter for the build tool named 'C++ Compiler' 
in the toolchain '' cannot be an empty character vector.
The 'Command' parameter for the build tool named 'C++ Linker' 
in the toolchain '' cannot be an empty character vector.

If you try to validate a toolchain before defined build tools are installed, validate produces an error.

[sflag,report] = tc.validate
Error using ToolchainInfo.validate (line 270)
Validation error(s):
### Validating other build tools ...

Unable to locate build tool "Intel C Compiler": icl
Unable to locate build tool "Intel C++ Compiler": icl
Unable to locate build tool "Intel C/C++ Archiver": xilib
Unable to locate build tool "Intel C/C++ Linker": xilink
Unable to locate build tool "NMAKE Utility": nmake

Version History

Introduced in R2013a