Property no_define — Suppress the normal generation of a preprocessor #define symbol in a configuration header file.


cdl_option <name> {


By default all active and enabled properties result in either one or two #define'd symbols in the package's configuration header file, and this is one of the main ways in which options can affect packages at build-time. It is possible to suppress the default #define's by specifying a no_define property in the body of an option or other CDL entity. This property takes no arguments and should occur only once in a given body.

The no_define property is frequently used in conjunction with one of the other header-file related properties such as define. If one of the other properties is used to export the required information to a configuration header file then often there is little point in exporting the default #define as well —  in fact there could be a name clash. Theno_define property can also be useful if the sole purpose of an option is to affect which files get built, and the default #define would never get tested in any source code. However in such cases the default #define is mostly harmless and there is little to be gained by suppressing it.


cdl_component CYG_HAL_STARTUP {
  display       "Startup type"
  flavor        data
  legal_values  { "RAM" "ROM" }
  default_value {"RAM"}
  define -file system.h CYG_HAL_STARTUP