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})
 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 } ) for ( config_name , c_data ) in spec [ 'configurations' ] . iteritems ( ) : p . AddFileConfig ( _FixPath ( primary_input ) , _ConfigFullName ( config_name , c_data ) , tools = [ tool ] )
add a custom build tool to execute something .