Unit 'fpmkunit' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#fcl]

TTargets.AddUnit

Adds a unit target to the collection

Declaration

Source position: fpmkunit.pp line 843

public function TTargets.AddUnit(

  const AUnitName: string

):TTarget;

function TTargets.AddUnit(

  const AUnitName: string;

  const OSes: TOSes

):TTarget;

function TTargets.AddUnit(

  const AUnitName: string;

  const CPUs: TCPUS;

  const OSes: TOSes

):TTarget;

Arguments

AUnitName

  

Name of the unit to add

Function result

Newly created unit target

Arguments

AUnitName

  

Name of the unit to add

OSes

  

Set of operating systems for which this unit should be compiled

Arguments

AUnitName

  

Name of the unit to add

CPUs

  

Set of CPU architectures for which this unit should be compiled

OSes

  

Set of operating systems for which this unit should be compiled

Description

Creates and adds a new unit target with the specified name to the target collection. The unit will be compiled as a regular Pascal unit and can optionally be restricted to specific CPU architectures and operating systems.

See also

AddProgram

  

Adds a program target to the collection

AddLibrary

  

Adds a library target to the collection

AddImplicitUnit

  

Adds an implicit unit target to the collection


Documentation generated on: Dec 15 2025