示例#1
0
def export_fp(node, fp):
  xml = XmlBuilder(fp)

  version = node.project.compiler.version 
  if version >= 1600 and version < 1800:
    toolsVersion = '4.0'
  elif version >= 1800:
    toolsVersion = '12.0'

  scope = xml.block('Project',
    DefaultTargets = 'Build',
    ToolsVersion = toolsVersion,
    xmlns = 'http://schemas.microsoft.com/developer/msbuild/2003'
  )
  with scope:
    export_body(node, xml)
示例#2
0
def export_fp(cm, node, fp):
    xml = XmlBuilder(fp)

    version = cm.generator.vs_vendor.version
    if version >= 'msvc-1910':
        toolsVersion = '15.0'
    elif version >= 'msvc-1900':
        toolsVersion = '14.0'
    elif version >= 'msvc-1800':
        toolsVersion = '12.0'
    elif version >= 'msvc-1600':
        toolsVersion = '4.0'

    scope = xml.block('Project',
                      DefaultTargets = 'Build',
                      ToolsVersion = toolsVersion,
                      xmlns = 'http://schemas.microsoft.com/developer/msbuild/2003')
    with scope:
        export_body(cm, node, xml)