target.BuildTool - Describe build tool - MATLAB (original) (raw)
Main Content
Namespace: target
Describe build tool
Since R2023a
Description
Use a target.BuildTool
object to describe a build tool. For example, a compiler, linker, or archiver.
To create a target.BuildTool
object, use the target.create function. Create the object in a single step.
buildToolObject = target.create('BuildTool', ... nameOfBuildToolType, ... buildToolCommandString, ... propertyXName, propertyXValue, ... propertyYName, propertyYValue, ... propertyZName, propertyZValue)
nameOfBuildToolType
is the name of thetarget.BuildToolType
object that you want to specify for theBuildToolType
property of buildToolObject
. For example 'C Compiler'
.
buildToolCommandString
is the build tool command, which includes required arguments and flags. For example 'gcc'
.
Properties
Unique ID of object in internal database.
Attributes:
GetAccess | public |
---|---|
SetAccess | private |
Name of build tool.
Attributes:
GetAccess | public |
---|---|
SetAccess | public |
Target hardware for the build tool.
Attributes:
GetAccess | public |
---|---|
SetAccess | public |
Development computer operating systems supported by the build tool.
Attributes:
GetAccess | public |
---|---|
SetAccess | public |
Command that invokes the build tool, which includes standard arguments that the command uses.
Attributes:
GetAccess | public |
---|---|
SetAccess | public |
Type or role of the tool in the toolchain. For example, C Compiler
, Assembler
, or Linker
.
Attributes:
GetAccess | public |
---|---|
SetAccess | public |
The file extensions for each type of input and output file that the tool processes.
Attributes:
GetAccess | public |
---|---|
SetAccess | public |
Directives (command-line flags) for the tool.
Attributes:
GetAccess | public |
---|---|
SetAccess | public |
Preferred file separator for the tool.
Attributes:
GetAccess | public |
---|---|
SetAccess | public |
Methods
Examples
This code snippet shows how you can use atarget.BuildTool
object to specify a C compiler that uses command files and generates object files with the .obj
extension.
cCompiler = target.create('BuildTool', 'C Compiler', 'gcc', ... 'Name', 'MinGW GCC C Compiler'); cCompiler.setDirective('CommandFile', '@'); cCompiler.setFileExtensions('Object', {'.obj'});
Version History
Introduced in R2023a