summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-10-08 09:56:51 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-10-08 14:53:48 +0200
commit27d1cc61b4f58e8ec25463275bee36c96b66b938 (patch)
treef9ee9b4be364141a1383ad5537fd719281a383d9 /bin
parentadd 'destructive-action' style to the close button of save changes (diff)
downloadcore-27d1cc61b4f58e8ec25463275bee36c96b66b938.tar.gz
core-27d1cc61b4f58e8ec25463275bee36c96b66b938.zip
Simplify VS IDE integration generation
Do not require the IDE version in vs*-ide-integration. Instead, use VCVER environment variable, that is set in configure, to obtain the toolset for the VCPROJ files. When introducing support for new VS version, the 'VisualStudioIntegrationGenerator.retrieve_toolset' method needs to be updated synchronously to list the toolset. This simplifies the make command to make vs-ide-integration TODO: also set the toolset in configure, to simplify the code here, and also in places like external/python3/ExternalProject_python3.mk (see commit c156a8c708f74dd31e1ef024edc578c3915619cb). Change-Id: I95960029a933be2cab96898eee6be6ca6bc5794a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123162 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gbuild-to-ide11
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index f349a3058aab..8e9d8ba157a6 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -916,7 +916,7 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
def __init__(self, gbuildparser, ide):
IdeIntegrationGenerator.__init__(self, gbuildparser, ide)
- self.toolset = self.retrieve_toolset(ide)
+ self.toolset = self.retrieve_toolset()
self.solution_directory = self.gbuildparser.builddir
self.configurations = {
'Build': {
@@ -936,9 +936,9 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
}
}
- def retrieve_toolset(self, ide):
- ide_toolset_map = {'vs2019': 'v142', 'vs2022': 'v143'}
- return ide_toolset_map[ide]
+ def retrieve_toolset(self):
+ ide_toolset_map = {'160': 'v142', '170': 'v143'}
+ return ide_toolset_map[os.environ['VCVER']]
def module_make_command(self, targets):
return '%(sh)s -c "PATH=\\"/bin:$PATH\\";BUILDDIR=\\"%(builddir)s\\" %(makecmd)s -rsC %(location)s ' + targets + '"'
@@ -1870,8 +1870,7 @@ if __name__ == '__main__':
'eclipsecdt': EclipseCDTIntegrationGenerator,
'kdevelop': KdevelopIntegrationGenerator,
'xcode': XcodeIntegrationGenerator,
- 'vs2019': VisualStudioIntegrationGenerator,
- 'vs2022': VisualStudioIntegrationGenerator,
+ 'vs': VisualStudioIntegrationGenerator,
'vim': VimIntegrationGenerator,
'debug': DebugIntegrationGenerator,
'qtcreator': QtCreatorIntegrationGenerator,