vs: do not add generated objects to project

VS2015 automatically picks up outputs from CustomBuild commands, which we
now use instead of CustomBuildStep commands, which do not get picked up
automatically.
pull/1483/head
Nicolas Schneider 8 years ago
parent b3073aa1ca
commit baa6df2ce7
  1. 8
      mesonbuild/backend/vs2010backend.py
  2. 11
      mesonbuild/backend/vs2015backend.py

@ -457,14 +457,14 @@ class Vs2010Backend(backends.Backend):
@staticmethod
def has_objects(objects, additional_objects, generated_objects):
# Ignore generated objects, those are automatically used by MSBuild for VS2010, because they are part of
# the CustomBuildStep Outputs.
# Ignore generated objects, those are automatically used by MSBuild because they are part of
# the CustomBuild Outputs.
return len(objects) + len(additional_objects) > 0
@staticmethod
def add_generated_objects(node, generated_objects):
# Do not add generated objects to project file. Those are automatically used by MSBuild for VS2010, because
# they are part of the CustomBuildStep Outputs.
# Do not add generated objects to project file. Those are automatically used by MSBuild, because
# they are part of the CustomBuild Outputs.
return
@staticmethod

@ -23,14 +23,3 @@ class Vs2015Backend(Vs2010Backend):
self.platform_toolset = 'v140'
self.vs_version = '2015'
@staticmethod
def has_objects(objects, additional_objects, generated_objects):
# VS2015 requires generated objects to be added explicitly to the project file.
return len(objects) + len(additional_objects) + len(generated_objects) > 0
@staticmethod
def add_generated_objects(node, generated_objects):
# VS2015 requires generated objects to be added explicitly to the project file.
for s in generated_objects:
ET.SubElement(node, 'Object', Include=s)
return

Loading…
Cancel
Save