Name

$ImplicitBuild Compiler Directive

Syntax

{$ImplicitBuild On}   // default
{$ImplicitBuild Off}

Scope

File

Description

By default, Delphi automatically rebuilds packages when it needs to. Disable the $ImplicitBuild directive to prevent Delphi from checking whether a package needs to be rebuilt.

During development of a package, it is best to enable implicit building, especially if you are working on multiple, interrelated packages. It is easy to forget which units have changed and which packages need to be recompiled, so let Delphi figure it out for you.

Once you have finished development of a package, you can disable implicit rebuilding to reduce the overhead of determining what needs to be rebuilt.

Tips and Tricks

  • The default setting applies only when the directive is omitted from a package source file. The package editor in Delphi’s IDE has its own default, and when it creates a new package, it inserts $ImplicitBuild Off in the package source file.

  • Note also that implicit building happens only when the source file changes. If you change only the form (that is, the .dfm file), the package is not rebuilt, even if the $ImplicitBuild directive is enabled.

See Also

Package Directive

Get Delphi in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.