target.CMake クラス
名前空間: target
説明
ソフトウェアに付属のバージョンの代わりに特定の CMake インストール環境を使用するツールチェーンを定義する場合は、target.CMake
オブジェクトを使用します。
target.CMake
オブジェクトの作成には関数 target.create
を使用します。
プロパティ
Version
— CMake バージョン
string
オプション。CMake ツールのバージョン。
属性:
GetAccess | public |
SetAccess | public |
Command
— CMake 実行可能ファイルのパス
target.Command
オブジェクト
CMake 実行可能ファイルの絶対パスを記述したオブジェクト。
属性:
GetAccess | public |
SetAccess | public |
HostOperatingSystemSupport
— サポートされているプラットフォーム
target.HostOperatingSystemSupport
オブジェクト
CMake インストール環境が実行できるプラットフォームを示すオブジェクト。
属性:
GetAccess | public |
SetAccess | public |
SupportedHardware
— ターゲット デバイス
target.HardwareComponentSupport
オブジェクト配列
オプション。CMake インストール環境でコードをビルドできるターゲット デバイスを示すオブジェクト。このプロパティが空の場合、ワイルドカードとして扱われます。
属性:
GetAccess | public |
SetAccess | public |
Name
— CMake ツールの名前
string
CMake ツール インストール環境の一意の名前。
例: 'CMake with Third-Party Customizations'
属性:
GetAccess | public |
SetAccess | public |
例
target.CMake
を使用した CMake インストール環境の指定
このコードの抜粋では、 target.Toolchain
オブジェクトおよび target.CMake
オブジェクトの Tools
プロパティを使用して CMake インストール環境を指定する方法を示します。
tc = target.create('Toolchain', 'Name', 'CMake/Ninja for all hosts'); tc.Builder = target.create('CMakeBuilder'); tc.Builder.Generator = 'Ninja'; tc.Builder.CommandLineCacheEntries(end+1) = ... target.create('CMakeCacheEntry', 'Name', 'CMAKE_C_COMPILER', 'Value', 'gcc'); tc.Builder.CommandLineCacheEntries(end+1) = ... target.create('CMakeCacheEntry', 'Name', 'CMAKE_CXX_COMPILER', 'Value', 'g++'); tc.Tools = target.create('CMake', 'Name', 'My CMake') tc.Tools(1).Command.String = 'C:\pathToMyCMakeInstallation\cmake.exe'
バージョン履歴
R2022b で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)