Main Content

validate

Class: coder.make.ToolchainInfo
Package: coder.make

Validate toolchain

Syntax

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

Description

h.validate validates the toolchain object and generates errors if any 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.

[success, report] = h.validate (___) validates the toolchain object, generates errors if any 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

Response indicating whether validate passed, returned as a numeric value. If any of the property values the method checks are invalid, the method returns 0. Otherwise, it returns 1.

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

Examples

Validate a toolchain before it has been installed

If you validate a default toolchain before all the build tools are specified, validate notifies you of the build tools that are not specified.

h = coder.make.ToolchainInfo;
[success,report] = h.validate
success  = 

     1


report  = 

Toolchain Validation Result: Passed

Validation report:

### Validation of build tool "C Compiler"
	Skipped. No "C Compiler" build tool is specified.

### Validation of build tool "C++ Compiler"
	Skipped. No "C++ Compiler" build tool is specified.

### Validation of build tool "Archiver"
	Skipped. No "Archiver" build tool is specified.

### Validation of build tool "Linker"
	Skipped. No "Linker" build tool is specified.

### Validation of build tool "Download"
	Skipped. No "Download" build tool is specified.

### Validation of build tool "Execute"
	Skipped. "Execute" build tool "$(PRODUCT)" cannot be validated.

### Validation of build tool "GMAKE Utility"
Checking for existence of path: %MATLAB%\bin\win64
	Passed.
Checking for tool command: gmake
	Passed.

### Checking for undeclared macros ...
	Passed.

Validate a toolchain before it has been installed

[success,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