DefineSet

Description

A datatype that defines a set of C preprocessor macros.

See Also

The CC task.

Parameters

Attribute Description Required
define A comma-separated list of preprocessor macros to define. These take the form macro[=value]. No
undefine A comma-separated list of preprocessor macros to undefine. No
refid A reference to another <defineset>. No other attributes or nested elements may be used with this attribute. No

Parameters specified as nested elements

define

Defines a preprocessor macro. It takes the following attributes:

Attribute Description Required
name The name of the macro to define. Yes
value The value to set the macro to. No

undefine

Undefines a preprocessor macro. It takes a single name attribute.

Examples

Below is a define set which defines two macros, SOMEDEF and ANOTHERDEF.

<defineset define="SOMEDEF, ANOTHERDEF" />

Below is a define set which defines the same macros, using nested elements.

<defineset>
    <define name="SOMEDEF" />
    <define name="ANOTHERDEF" />
</defineset>

Below is a define set which gives macro SOMEDEF the value 1, and undefines macro UNWANTEDDEF.

<defineset>
    <define name="SOMEDEF" value="1" />
    <undefine name="UNWANTEDDEF" />
</defineset>