Skip to main content

publicDefines property

note

Work in progress.

Purpose

Specify compiler preprocessor macros passed on the compiler command line when compiling the source files of the current component and propagated up to the artefact.

Syntax

{
"cdlOptions | cdlComponents": [
{
"name": "...",
...
"publicDefines": [
"<name>[=<value>]",
...
],
...
}
]
}

The value of the publicDefines property is an array of names, possibly with values.

Default value

If missing, the current object will not contribute any preprocessor macros to the build.

Description

Generally, preprocessor macros are defined at the top level and apply to all sources that enter the build.

In some cases, it might be necessary to define preprocessor macros for each component.

Public preprocessor macros are also propagated propagated up to the artefact and later applied to all sources.

TODO

Examples

{
"cdlComponents": [
{
"name": "lists",
...
"publicDefines": [
"SOMETHING",
"THE_ANSWER=42"
],
...
}
]
}

See also

  • TODO

eCos reference