Merge Includes

Some projects might compile faster if header files are copied into one folder.

A configuration, e.g. a LibraryConfig, can have a mergeInc flag:
  • “no” = none of the include folders of this config will ever be merged.

  • “yes” = inherited include folders will be merged when compiling this config (except include folders which configs have explicit mergeInc “no”).

  • “all” = all include folders will be merged when compiling this config (except include folders which configs have explicit mergeInc “no”).

  • unset = when building THIS config no include folders are merged.

Usually only very few configs should have mergeInc “no”. This might be necessary if source files have broken include directives.

To enable mergeInc via Adapt only for the main config:

Adapt {
  CustomConfig __MAIN__, project: __MAIN__, type: extend, mergeInc: "yes" # or replace instead of extend
}

To enable mergeInc via Adapt for all configs:

Adapt {
  CustomConfig __ALL__, project: __ALL__, type: extend, mergeInc: "yes" # or replace instead of extend
}

Note

When mergeInc is set to “no”, this cannot be overwritten by Adapt. In fact, this is the only thing which cannot be overwritten!

Note

Not ALL files from an include folder are copied. The folder <projectDir>/build/ and everything beginning with <projectDir>/. will be ignored. Only files with ending h* and i* are copied.

Note

For MISRA checking use “yes”, not “all”, otherwise MISRA tooling does not know which header file belongs to the current project.