ExecutableConfig A
LibraryConfig B, extends: A
CustomConfig C, extends: B
ExecutableConfig D, extends: C
The config type of the parent config does not matter, but only settings which are valid in BOTH configs will be inherited.The following listing shows HOW settings will be derived:
Setting | Derived |
---|---|
Dependency | parent + child |
ExternalLibrary ExternalLibrarySearchPath UserLibrary | parent + child (ordered by line number!) |
PreSteps | parent + child |
PostSteps | parent + child |
Toolchain DefaultToolchain | Compiler, Archiver and Linker settings used from parent if not existing in child - see below |
Makefile/CommandLine (in CustomConfig) | used from parent if not in child |
Files | parent + child |
ExcludeFiles | parent + child |
IncludeDir | parent + child |
LinkerScript | used from parent if not in child |
ArtifactName | used from parent if not in child |
MapFile | used from parent if not in child |
ExecutableConfig A {
Toolchain {
Compiler CPP {
Define "DefA"
}
Linker {
Flags "-O3"
}
}
}
ExecutableConfig B, extends: A {
Toolchain {
Compiler CPP {
Define "DefB1"
}
Compiler ASM {
Define "DefB2"
}
Archiver {
Flags "-B"
}
}
}
B derives from A, but B redefines Compiler CPP, therefore "DefA" will not be defined in B. But the toolchain of B does not include a Linker tag, therefore the Linker will be inherited.Toolchain {
Compiler CPP {
Define "DefB1"
}
Compiler ASM {
Define "DefB2"
}
Archiver {
Flags "-B"
}
Linker {
Flags "-O3"
}
}