Next: , Previous: Command Line, Up: Building with GPRbuild   [Contents][Index]

3.1.2 Switches

GPRbuild takes into account switches that may be specified on the command line or in attributes Switches(<main or language>) or Default_Switches (<language) in package Builder of the main project.

When there are a single main (specified on the command line or in attribute Main in the main project), the switches that are taken into account in package Builder of the main project are Switches (<main>), if declared, or Switches (<language of main>), if declared.

When there are several mains, if there are sources of the same language, then Switches (<language of main>) is taken into account, if specified.

When there are no main specified, if there is only one compiled language (that is a language with a non empty Compiler Driver), then Switches (<single language>) is taken into account, if specified.

The switches that are interpreted directly by GPRbuild are listed below.

First, the switches that may be specified only on the command line, but not in package Builder of the main project:

Then, the switches that may be specified on the command line as well as in package Builder of the main project (attribute Switches):

Switches that are accepted for compatibility with gnatmake, either on the command line or in the Builder Ada switches in the main project file:

These switches are passed to the Ada compiler.