Modes are defined in a builder-mode
node which has one attributes,
name
, which contains the name of the model, and which supports the
following sub-nodes:
<description>
<subdir>
%subdir
in the extra-args
nodes will be
substituted with this.
<supported-model>
supported-model
nodes, each corresponding to a supported Model.
Optionally, you can specify a filter
attribute for this node,
corresponding to the switches that are relevant for this mode. By default,
all switches will be taken into account.
The extra-args
of the Mode that match filter
will be passed
to commands of the supported Models.
<extra-args>
<arg>
nodes, each containing one extra argument
to append to the command line when launching Targets while this Mode is
active.
Macros are supported in the <arg>
nodes.
<?xml version="1.0" ?> <my_mode> <builder-mode name="optimization"> <description>Build with code optimization activated</description> <subdir>optimized_objects</subdir> <supported-model>builder</supported-model> <supported-model>gnatmake</supported-model> <supported-model filter="--subdirs=">gprclean</supported-model> <extra-args> <arg>--subdirs=%subdir</arg> <arg>-cargs</arg> <arg>-O2</arg> </extra-args> </builder-mode> </my_mode>