MCPcopy Create free account
hub / github.com/nodejs/node / _AddCustomBuildToolForMSVS

Function _AddCustomBuildToolForMSVS

tools/gyp/pylib/gyp/generator/msvs.py:492–521  ·  view source on GitHub ↗

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
)

Source from the content-addressed store, hash-verified

490
491
492def _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
524def _AddAccumulatedActionsToMSVS(p, spec, actions_dict):

Callers 1

Calls 6

_FixPathsFunction · 0.85
_FixPathFunction · 0.85
_ConfigFullNameFunction · 0.85
AddFileConfigMethod · 0.80
joinMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected