Switch can be used inside a command to add different arguments
depending on the value of an attribute in the launching task. Exactly
what attributes are available depends on attributes of the launching
task. The attribute must be set in the calling task.
Attribute | Description | Required |
---|---|---|
attribute | The attribute in the launching task to test
against the case-branches |
Yes. |
Specify one case-element for every test to make. At most one case
statement can match. If no case matches, the default statement is
used.
For example, inside a command for a compiler:
<switch attribute="debug">Note that the above example really is an if-statement in disguise.
<case value="true">
<arg value="/D_DEBUG"/>
</case>
<case value="false">
<arg></arg>
</case>
</switch>