Add a custom build tool to execute something. Arguments: p: the target project spec: the target project dict primary_input: input file to attach the build tool to inputs: list of inputs outputs: list of outputs description: description of the action cmd
(
p, spec, primary_input, inputs, outputs, description, cmd
)
| 490 | |
| 491 | |
| 492 | def _AddCustomBuildToolForMSVS( |
| 493 | p, spec, primary_input, inputs, outputs, description, cmd |
| 494 | ): |
| 495 | """Add a custom build tool to execute something. |
| 496 | |
| 497 | Arguments: |
| 498 | p: the target project |
| 499 | spec: the target project dict |
| 500 | primary_input: input file to attach the build tool to |
| 501 | inputs: list of inputs |
| 502 | outputs: list of outputs |
| 503 | description: description of the action |
| 504 | cmd: command line to execute |
| 505 | """ |
| 506 | inputs = _FixPaths(inputs) |
| 507 | outputs = _FixPaths(outputs) |
| 508 | tool = MSVSProject.Tool( |
| 509 | "VCCustomBuildTool", |
| 510 | { |
| 511 | "Description": description, |
| 512 | "AdditionalDependencies": ";".join(inputs), |
| 513 | "Outputs": ";".join(outputs), |
| 514 | "CommandLine": cmd, |
| 515 | }, |
| 516 | ) |
| 517 | # Add to the properties of primary input for each config. |
| 518 | for config_name, c_data in spec["configurations"].items(): |
| 519 | p.AddFileConfig( |
| 520 | _FixPath(primary_input), _ConfigFullName(config_name, c_data), tools=[tool] |
| 521 | ) |
| 522 | |
| 523 | |
| 524 | def _AddAccumulatedActionsToMSVS(p, spec, actions_dict): |
no test coverage detected