Buy the book!
|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
Switch settings for a project-aware tool can be specified through attributes
in the package corresponding to the tool.
The example above illustrates one of the relevant attributes,
Default_Switches, defined in the packages in both project files.
Unlike simple attributes like
known as an associative array. When you define this attribute, you must
supply an "index" (a literal string), and the effect of the attribute
definition is to set the value of the "array" at the specified "index".
Default_Switches attribute, the index is a programming
language (in our case, Ada) , and the value specified (after
must be a list of string expressions.
The attributes permitted in project files are restricted to a predefined set. Some may appear at project level, others in packages. For any attribute that is an associate array, the index must always be a literal string, but the restrictions on this string (e.g., a file name or a language name) depend on the individual attribute. Also depending on the attribute, its specified value will need to be either a string or a string list.
Debug project, we set the switches for two tools,
gnatmake and the compiler, and thus we include corresponding
packages, with each package defining the
Note that the package corresponding to
gnatmake is named
Release project is
similar, but with just the
Debug above the switches starting with `-gnat' that
are specified in package
Compiler could have been placed in package
gnatmake transmits all such switches to the
|webmaster||delorie software privacy|
|Copyright © 2003 by The Free Software Foundation||Updated Jun 2003|