Next: , Previous: The Target Configuration Dialog, Up: Compilation/Build


9.3 The Build Mode

GPS provides an easy way to build your project with different options, through the Mode selection, located in the main toolbar.

When the Mode selection is set to default, the build is done using the switches defined in the project. When the Mode selection is set to another value, then specialized parameters are passed to the builder. For instance, the gcov Mode adds all the compilation parameters needed to instrument the produced objects and executables to work with the gcov tool.

In addition to changing the build parameters, the Mode selection has the effect of changing the output directory for objects and executables. For instance, objects produced under the debug mode will be located in the debug subdirectories of the object directories defined by the project. This allows switching from one Mode to another without having to erase the objects pertaining to a different Mode.

It is possible to define new Modes using XML customization, see Customizing build Targets and Models.

Note that the Build Mode affects only builds done using recent versions of gnatmake and gprbuild. The Mode selection has no effect on builds done through Targets that launch other builders.