def _GetMSBuildExternalBuilderTargets(spec):
 build_cmd = _BuildCommandLineForRuleRaw(spec, spec['msvs_external_builder_build_cmd'], False, False, False, False)
 build_target = ['Target', {'Name': 'Build'}]
 build_target.append(['Exec', {'Command': build_cmd}])
 clean_cmd = _BuildCommandLineForRuleRaw(spec, spec['msvs_external_builder_clean_cmd'], False, False, False, False)
 clean_target = ['Target', {'Name': 'Clean'}]
 clean_target.append(['Exec', {'Command': clean_cmd}])
 targets = [build_target, clean_target]
 if spec.get('msvs_external_builder_clcompile_cmd'):
  clcompile_cmd = _BuildCommandLineForRuleRaw(spec, spec['msvs_external_builder_clcompile_cmd'], False, False, False, False)
  clcompile_target = ['Target', {'Name': 'ClCompile'}]
  clcompile_target.append(['Exec', {'Command': clcompile_cmd}])
  targets.append(clcompile_target)
 return targets

def _GetMSBuildExternalBuilderTargets ( spec ) : build_cmd = _BuildCommandLineForRuleRaw ( spec , spec [ 'msvs_external_builder_build_cmd' ] , False , False , False , False ) build_target = [ 'Target' , { 'Name' : 'Build' } ] build_target . append ( [ 'Exec' , { 'Command' : build_cmd } ] ) clean_cmd = _BuildCommandLineForRuleRaw ( spec , spec [ 'msvs_external_builder_clean_cmd' ] , False , False , False , False ) clean_target = [ 'Target' , { 'Name' : 'Clean' } ] clean_target . append ( [ 'Exec' , { 'Command' : clean_cmd } ] ) targets = [ build_target , clean_target ] if spec . get ( 'msvs_external_builder_clcompile_cmd' ) : clcompile_cmd = _BuildCommandLineForRuleRaw ( spec , spec [ 'msvs_external_builder_clcompile_cmd' ] , False , False , False , False ) clcompile_target = [ 'Target' , { 'Name' : 'ClCompile' } ] clcompile_target . append ( [ 'Exec' , { 'Command' : clcompile_cmd } ] ) targets . append ( clcompile_target ) return targets
return a list of msbuild targets for external builders .