Background Compilation

From RAD Studio
Jump to: navigation, search

Go Up to Compiling, Building, and Running Applications Index


Both Delphi and C++ compilers now allow you to perform background compilation -- that is, you can start a compile running as a separate and parallel thread and continue working in the IDE while the compiler compiles your project.

The video How To Run Your Delphi Compiler In the Background shows how to run the compiler in the background.

To enable background compilation, check the Background Compilation checkbox on the Tools > Options > Environment Options dialog box. You can specfiy that the backgound compilation thread is to have a priority of Low, Normal, or High. The recommended (and default) priority is Normal. When background compilation is enabled, nearly any Build or Compile command that you invoke in the IDE runs as a background thread.

Commands that only do foreground compilation (even when background compilation is enabled) include:

You Can Work During Background Compilation

You can continue to work in the IDE while a background compilation runs. For example, you can edit files, even the files you are compiling, and you can set and modify breakpoints.

Restrictions During Background Compilation

You cannot do the following tasks in the IDE when a background compilation is running:

  • Close the project that is being compiled.
  • Change the active project.
  • Install packages (if you do attempt to install a package, in some cases the IDE prompts you to stop the background compilation thread).
  • Run or debug another application.
  • Load or attach to a process.
  • Do refactoring.
  • Start another compilation.
  • Design forms.
  • Use CodeInsight or ErrorInsight.
  • Use the Structure Pane to examine source files.
  • Add projects to the project group.
  • Change build configurations.
  • Change Project Options settings.
  • Modify the project by adding or removing files.

See Also