Add actions accumulated into an actions_dict, merging as needed. Arguments: p: the target project spec: the target project dict actions_dict: dictionary keyed on input name, which maps to a list of dicts describing the actions attached to that input file.
(p, spec, actions_dict)
| 522 | |
| 523 | |
| 524 | def _AddAccumulatedActionsToMSVS(p, spec, actions_dict): |
| 525 | """Add actions accumulated into an actions_dict, merging as needed. |
| 526 | |
| 527 | Arguments: |
| 528 | p: the target project |
| 529 | spec: the target project dict |
| 530 | actions_dict: dictionary keyed on input name, which maps to a list of |
| 531 | dicts describing the actions attached to that input file. |
| 532 | """ |
| 533 | for primary_input in actions_dict: |
| 534 | inputs = OrderedSet() |
| 535 | outputs = OrderedSet() |
| 536 | descriptions = [] |
| 537 | commands = [] |
| 538 | for action in actions_dict[primary_input]: |
| 539 | inputs.update(OrderedSet(action["inputs"])) |
| 540 | outputs.update(OrderedSet(action["outputs"])) |
| 541 | descriptions.append(action["description"]) |
| 542 | commands.append(action["command"]) |
| 543 | # Add the custom build step for one input file. |
| 544 | description = ", and also ".join(descriptions) |
| 545 | command = "\r\n".join(commands) |
| 546 | _AddCustomBuildToolForMSVS( |
| 547 | p, |
| 548 | spec, |
| 549 | primary_input=primary_input, |
| 550 | inputs=inputs, |
| 551 | outputs=outputs, |
| 552 | description=description, |
| 553 | cmd=command, |
| 554 | ) |
| 555 | |
| 556 | |
| 557 | def _RuleExpandPath(path, input_file): |
no test coverage detected