Next: , Up: gnatmake and Project Files

12.1.1 Switches Related to Project Files

The following switches are used by GNAT tools that support project files:

Indicates the name of a project file. This project file will be parsed with the verbosity indicated by ^-vP^MESSAGE_PROJECT_FILES=^x, if any, and using the external references indicated by ^-X^/EXTERNAL_REFERENCE^ switches, if any. There may zero, one or more spaces between -P and project.

There must be only one ^-P^/PROJECT_FILE^ switch on the command line.

Since the Project Manager parses the project file only after all the switches on the command line are checked, the order of the switches ^-P^/PROJECT_FILE^, ^-vP^/MESSAGES_PROJECT_FILE=^x or ^-X^/EXTERNAL_REFERENCE^ is not significant.

Indicates that external variable name has the value value. The Project Manager will use this value for occurrences of external(name) when parsing the project file.

If name or value includes a space, then name=value should be put between quotes.

            -X"user=John Doe"

Several ^-X^/EXTERNAL_REFERENCE^ switches can be used simultaneously. If several ^-X^/EXTERNAL_REFERENCE^ switches specify the same name, only the last one is used.

An external variable specified with a ^-X^/EXTERNAL_REFERENCE^ switch takes precedence over the value of the same name in the environment.

Indicates the verbosity of the parsing of GNAT project files.

-vP0 means Default; -vP1 means Medium; -vP2 means High.

The default is ^Default^DEFAULT^: no output for syntactically correct project files. If several ^-vP^/MESSAGES_PROJECT_FILE=^x switches are present, only the last one is used.

Add directory <dir> at the beginning of the project search path, in order, after the current working directory.
Follow all symbolic links when processing project files.
This switch is recognized by gnatmake and gnatclean. It indicate that the real directories (except the source directories) are the subdirectories <subdir> of the directories specified in the project files. This applies in particular to object directories, library directories and exec directories. If the subdirectories do not exist, they are created automatically.