def generateRecursive(self, component, all_components, builddir=None, modbuilddir=None, processed_components=None, application=None):
assert(self.configured)<EOL>if builddir is None:<EOL><INDENT>builddir = self.buildroot<EOL><DEDENT>if modbuilddir is None:<EOL><INDENT>modbuilddir = os.path.join(builddir, '<STR_LIT>')<EOL><DEDENT>if processed_components is None:<EOL><INDENT>processed_components = dict()<EOL><DEDENT>if not self.target:<EOL><INDENT>yield '<STR_LIT>' % self.target<EOL><DEDENT>toplevel = not len(processed_components)<EOL>logger.debug('<STR_LIT>' % (component, self.target))<EOL>recursive_deps = component.getDependenciesRecursive(<EOL>available_components = all_components,<EOL>target = self.target,<EOL>available_only = True,<EOL>test = True<EOL>)<EOL>dependencies = component.getDependencies(<EOL>all_components,<EOL>target = self.target,<EOL>available_only = True,<EOL>test = True<EOL>)<EOL>for name, dep in dependencies.items():<EOL><INDENT>if not dep:<EOL><INDENT>if dep.isTestDependency():<EOL><INDENT>logger.debug('<STR_LIT>' % (name, component))<EOL><DEDENT>else:<EOL><INDENT>yield '<STR_LIT>' % (name, component)<EOL><DEDENT><DEDENT><DEDENT>processed_components[component.getName()] = component<EOL>new_dependencies = OrderedDict([(name,c) for name,c in dependencies.items() if c and not name in processed_components])<EOL>self.generate(builddir, modbuilddir, component, new_dependencies, dependencies, recursive_deps, application, toplevel)<EOL>logger.debug('<STR_LIT>' % component)<EOL>for d in recursive_deps.values():<EOL><INDENT>logger.debug('<STR_LIT>' % d)<EOL><DEDENT>processed_components.update(new_dependencies)<EOL>for name, c in new_dependencies.items():<EOL><INDENT>for error in self.generateRecursive(<EOL>c, all_components, os.path.join(modbuilddir, name), modbuilddir, processed_components, application=application<EOL>):<EOL><INDENT>yield error<EOL><DEDENT><DEDENT>
generate top-level CMakeLists for this component and its
            dependencies: the CMakeLists are all generated in self.buildroot,
            which MUST be out-of-source

            !!! NOTE: experimenting with a slightly different way of doing
            things here, this function is a generator that yields any errors
            produced, so the correct use is:

            for error in gen.generateRecursive(...):
                print(error)