Main Content

validate

クラス: coder.make.ToolchainInfo
名前空間: coder.make

ツールチェーンの検証

構文

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

説明

h.validate はツールチェーン オブジェクトを検証し、プロパティの定義に誤りがある場合はエラーを生成します。

h.validate('setup','cleanup') は検証前にツールチェーン オブジェクトのセットアップ コールバック (ShellSetup および MATLABSetup) を評価し、検証後にツールチェーン オブジェクトのクリーンアップ コールバック (ShellCleanup および MATLABCleanup) を評価します。構成パラメーター ダイアログ ボックスでは、ツールチェーンを検証するときにこのバージョンの validate を実行します。

[sflag, report] = h.validate (___) はツールチェーン オブジェクトを検証し、プロパティの定義が適切でない場合はエラーを発生させ、オプションの出力引数を返します。

入力引数

すべて展開する

coder.make.ToolchainInfo オブジェクト。h のようにオブジェクト ハンドルを使用して指定します。h を作成するには、MATLAB® コマンド ウィンドウで「h = coder.make.ToolchainInfo」と入力します。

ツールチェーンの setup を評価します。

ツールチェーンの cleanup を評価します。

出力引数

すべて展開する

検証の応答。数値として返されます。メソッドがチェックしたプロパティ値のいずれかが無効である場合、0 が返されます。それ以外の場合は 1 が返されます。

無効なプロパティの情報。0 が返された場合にのみ使用可能です。

すべて展開する

ビルド ツールの定義前にツールチェーンを検証しようとすると、validate はエラーを生成します。

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.

ビルド ツールのインストール前にツールチェーンを検証しようとすると、validate はエラーを生成します。

[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

バージョン履歴

R2013a で導入