def actual_clean_targets(targets): # Construct a list of projects explicitly detected as targets on this build # system run. These are the projects under which cleaning is allowed. for t in targets: if isinstance(t, b2.build.targets.ProjectTarget): project_targets.append(t.project_module()) # Construct a list of targets explicitly detected on this build system run # as a result of building main targets. targets_to_clean = set() for t in results_of_main_targets: # Do not include roots or sources. targets_to_clean.update(virtual_target.traverse(t)) to_clean = [] for t in get_manager().virtual_targets().all_targets(): # Remove only derived targets. if t.action(): p = t.project() if t in targets_to_clean or should_clean_project( p.project_module()): to_clean.append(t) return [t.actualize() for t in to_clean]
def actual_clean_targets(targets): # Construct a list of projects explicitly detected as targets on this build # system run. These are the projects under which cleaning is allowed. for t in targets: if isinstance(t, b2.build.targets.ProjectTarget): project_targets.append(t.project_module()) # Construct a list of targets explicitly detected on this build system run # as a result of building main targets. targets_to_clean = set() for t in results_of_main_targets: # Do not include roots or sources. targets_to_clean.update(virtual_target.traverse(t)) to_clean = [] for t in get_manager().virtual_targets().all_targets(): # Remove only derived targets. if t.action(): p = t.project() if t in targets_to_clean or should_clean_project(p.project_module()): to_clean.append(t) return [t.actualize() for t in to_clean]