Skip to content

TTargets

Collection class for managing build targets

Declaration

Source position: fpmkunit.pp line 840

type

  TTargets = class(TNamedCollection)
  public
    function AddFPDoc : TTarget;
    function AddUnit(const AUnitName: string) : TTarget;
    function AddUnit(const AUnitName: string; const OSes: TOSes) : TTarget;
    function AddUnit(const AUnitName: string; const CPUs: TCPUS; 
                const OSes: TOSes) : TTarget;
    function AddImplicitUnit(const AUnitName: string; 
                        InstallUnit: Boolean=True) : TTarget;
    function AddImplicitUnit(const AUnitName: string; const OSes: TOSes; 
                        InstallUnit: Boolean=True) : TTarget;
    function AddImplicitUnit(const AUnitName: string; const CPUs: TCPUS; 
                        InstallUnit: Boolean=True) : TTarget;
    function AddImplicitUnit(const AUnitName: string; const CPUs: TCPUS; 
                        const OSes: TOSes; InstallUnit: Boolean=True)
                         : TTarget;
    function AddProgram(const AProgramName: string) : TTarget;
    function AddProgram(const AProgramName: string; const OSes: TOSes)
                    : TTarget;
    function AddProgram(const AProgramName: string; const CPUs: TCPUS; 
                   const OSes: TOSes) : TTarget;
    function AddLibrary(const ALibraryName: string) : TTarget;
    function AddLibrary(const ALibraryName: string; const OSes: TOSes)
                    : TTarget;
    function AddLibrary(const ALibraryName: string; const CPUs: TCPUS; 
                   const OSes: TOSes) : TTarget;
    function AddExampleUnit(const AUnitName: string) : TTarget;
    function AddExampleUnit(const AUnitName: string; const OSes: TOSes)
                        : TTarget;
    function AddExampleUnit(const AUnitName: string; const CPUs: TCPUS; 
                       const OSes: TOSes) : TTarget;
    function AddExampleProgram(const AProgramName: string) : TTarget;
    function AddExampleProgram(const AProgramName: string; 
                          const OSes: TOSes) : TTarget;
    function AddExampleProgram(const AProgramName: string; 
                          const CPUs: TCPUS; const OSes: TOSes)
                           : TTarget;
    function GetEnumerator : TTargetEnumerator;
    property Targets[AName : string]: TTarget; {r}
    property TargetItems[Index : Integer]: TTarget; {rw}
  end;

Description

TTargets is a collection class that manages multiple TTarget instances within a package. It provides methods to add different types of targets such as units, programs, libraries, and documentation targets.

The collection supports various convenience methods for adding specific target types with optional CPU and OS restrictions, making it easy to create cross-platform build configurations.

Properties

Member Visibility Description
TargetItems public Indexed access to build targets in the collection
Targets read only public Access to build target by name
See all Properties

Methods

Member Visibility Description
AddExampleProgram public Adds an example program target to the collection
AddExampleUnit public Adds an example unit target to the collection
AddFPDoc public Adds a documentation target to the collection
AddImplicitUnit public Adds an implicit unit target to the collection
AddLibrary public Adds a library target to the collection
AddProgram public Adds a program target to the collection
AddUnit public Adds a unit target to the collection
GetEnumerator public Gets enumerator for iterating build targets
See all Methods

See also

Name Description
TTarget Build target representation in the fpmake system
TTargetEnumerator Enumerator for iterating through build targets
TPackage Central class for package management and building