(p, spec, primary_input,
                               inputs, outputs, description, cmd)
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: command line to execute
Add a custom build tool to execute something.
Add a custom build tool to execute something .
def _AddCustomBuildToolForMSVS(p, spec, primary_input,
                               inputs, outputs, description, cmd):
  """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: command line to execute
  """
  inputs = _FixPaths(inputs)
  outputs = _FixPaths(outputs)
  tool = MSVSProject.Tool(
      'VCCustomBuildTool',
      {'Description': description,
       'AdditionalDependencies': ';'.join(inputs),
       'Outputs': ';'.join(outputs),
       'CommandLine': cmd,
      })
  # Add to the properties of primary input for each config.
  for config_name, c_data in spec['configurations'].iteritems():
    p.AddFileConfig(_FixPath(primary_input),
                    _ConfigFullName(config_name, c_data), tools=[tool])
def _AddCustomBuildToolForMSVS ( p , spec , primary_input , inputs , outputs , description , cmd ) : inputs = _FixPaths ( inputs ) outputs = _FixPaths ( outputs ) tool = MSVSProject . Tool ( 'VCCustomBuildTool' , { 'Description' : description , 'AdditionalDependencies' : ';' . join ( inputs ) , 'Outputs' : ';' . join ( outputs ) , 'CommandLine' : cmd , } ) # Add to the properties of primary input for each config. for config_name , c_data in spec [ 'configurations' ] . iteritems ( ) : p . AddFileConfig ( _FixPath ( primary_input ) , _ConfigFullName ( config_name , c_data ) , tools = [ tool ] )