Sign in Join
FPDoc Onlineexperiment

TTarget class

In unit fpMkUnit

Build target representation in the fpmake system

Declaration

pascal
TTarget = class(TNamedItem)

Inheritance

  1. TTarget
  2. TNamedItem
  3. TCollectionItem
  4. TPersistent
  5. TObject

Description

TTarget represents a single build target within a package, such as a unit, program, or library. Each target defines what needs to be compiled, how it should be compiled, and where the resulting files should be installed.

Build targets can be units, programs, libraries, or documentation files. They contain information about source files, compilation options, dependencies, CPU and OS requirements, and installation settings.

Targets are managed through the TTargets collection and are owned by TPackage instances.

See also

Properties

DependenciespublicCollection of target dependencies
ResourceFilespublicCollection of resource files for the target
CommandspublicCollection of custom commands for the target
StatepublicCurrent build state of the target
TargetTypepublicType of the build target
OSespublicSet of operating systems this target supports
CPUspublicSet of CPU architectures this target supports
SubTargetspublicArray of subtarget names for this target
ModepublicCompiler mode for the target
OptionspublicCompiler options for the target
SourceFileNamepublicResolved source file name for the target
UnitFileNamepublicResolved unit file name for the target
ObjectFileNamepublicResolved object file name for the target
LTOFileNamepublicLink-time optimization file name for the target
RSTFileNamepublicResource string table filename for the target
RSJFileNamepublicResource string JSON filename for the target
FPCTargetpublicFPC compiler target specification
ExtensionpublicFile extension for the compiled target
FileTypepublicType of file this target generates
DirectorypublicDirectory where the target source files are located
ResourceStringspublicWhether to generate resource string support for the target
InstallpublicWhether this target should be installed
TargetSourceFileNamepublicSource filename for the build target
ObjectPathpublicPath for object files generated during compilation
UnitPathpublicSearch path for unit files during compilation
IncludePathpublicSearch path for include files during compilation
XMLpublicWhether to generate XML documentation for the target
IsFPMakePluginpublicWhether this target is an FPMake plugin
BeforeCompilepublicEvent handler executed before target compilation
AfterCompilepublicEvent handler executed after target compilation
BeforeCleanpublicEvent handler executed before target cleanup
AfterCleanpublicEvent handler executed after target cleanup

Methods

GetSourceFileNameprotected
GetUnitFileNameprotected
GetUnitLibFileNameprotected
GetObjectFileNameprotected
GetLTOFileNameprotected
GetBinFileBaseprotected
GetRSTFileNameprotected
GetRSJFileNameprotected
GetImportLibFileNameprotected
GetProgramFileNameprotected
GetProgramDebugFileNameprotected
GetLibraryFileNameprotected
GetLibraryDebugFileNameprotected
CreatepublicCreates a new build target instance
DestroypublicDestroys the target instance and frees resources
AssignTopublicAssigns target properties to another object
GetOutputFileNamepublicReturns the target's output filename for the specified OS
HaveOptionspublicChecks if target has compilation options
AddOptionpublicAdds a compilation option to the target
SubTargetAllowedpublicChecks if a subtarget is allowed for this target
SubTargetsAsStringpublicReturns all subtargets as a comma-separated string
SetNamepublicSets the name of the target
SetExeNamepublicSets the executable name for the target
SetXMLpublicSets XML configuration data for the target
GetCleanFilespublicGets list of files to be cleaned for this target
GetArchiveFilespublicGets list of files to be archived for this target
GetInstallFilespublicGets list of files to be installed for this target

Inherited

From TNamedItem (1)

Name

From TCollectionItem (11)

Changed Collection DisplayName GetDisplayName GetNamePath GetOwner ID Index SetCollection SetDisplayName SetIndex

From TPersistent (5)

Assign DefineProperties FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (40)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.