CCompiler

Description

A data type that defines a set of C compiler configuration.

See Also

The CC task.

Parameters

Attribute Description Required
name The name of the toolset to use. See the CC task for a list of supported toolsets. No
if Only use this compiler configuration if the specified property is set. No
unless Do not use this compiler configuration if the specified property is set. No

Parameters specified as nested elements

Each of the nested elements may appear multiple times.

compilerarg

An additional command-line argument to pass to the compiler.

defineset

A set of preprocessor macros to define and/or undefine. See the DefineSet data type for details.

includepath

A Path that specifies the directories to use when searching for header files. This path is passed to the compiler, and is used by the CC task when it is performing header file dependency checking.

sysincludepath

A Path that specifies the directories to use when searching for system header files. This path is passed to the compiler. It is not used by the CC task when it is performing header file dependency checking.

Examples

The following example defines a compiler configuration that is used when the release.windows property is set. It configures the CC task to:

<compiler name="msvc" if="release.windows">
    <defineset define="NDEBUG"/>
    <compilerarg value="/Ox"/>
</compiler>