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 c156a8c708
).
Change-Id: I95960029a933be2cab96898eee6be6ca6bc5794a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123162
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
@@ -483,8 +483,7 @@ endef
|
|||||||
|
|
||||||
$(foreach ide,\
|
$(foreach ide,\
|
||||||
codelite \
|
codelite \
|
||||||
vs2019 \
|
vs \
|
||||||
vs2022 \
|
|
||||||
kdevelop \
|
kdevelop \
|
||||||
vim \
|
vim \
|
||||||
qtcreator \
|
qtcreator \
|
||||||
|
@@ -916,7 +916,7 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
|
|||||||
|
|
||||||
def __init__(self, gbuildparser, ide):
|
def __init__(self, gbuildparser, ide):
|
||||||
IdeIntegrationGenerator.__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.solution_directory = self.gbuildparser.builddir
|
||||||
self.configurations = {
|
self.configurations = {
|
||||||
'Build': {
|
'Build': {
|
||||||
@@ -936,9 +936,9 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def retrieve_toolset(self, ide):
|
def retrieve_toolset(self):
|
||||||
ide_toolset_map = {'vs2019': 'v142', 'vs2022': 'v143'}
|
ide_toolset_map = {'160': 'v142', '170': 'v143'}
|
||||||
return ide_toolset_map[ide]
|
return ide_toolset_map[os.environ['VCVER']]
|
||||||
|
|
||||||
def module_make_command(self, targets):
|
def module_make_command(self, targets):
|
||||||
return '%(sh)s -c "PATH=\\"/bin:$PATH\\";BUILDDIR=\\"%(builddir)s\\" %(makecmd)s -rsC %(location)s ' + 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,
|
'eclipsecdt': EclipseCDTIntegrationGenerator,
|
||||||
'kdevelop': KdevelopIntegrationGenerator,
|
'kdevelop': KdevelopIntegrationGenerator,
|
||||||
'xcode': XcodeIntegrationGenerator,
|
'xcode': XcodeIntegrationGenerator,
|
||||||
'vs2019': VisualStudioIntegrationGenerator,
|
'vs': VisualStudioIntegrationGenerator,
|
||||||
'vs2022': VisualStudioIntegrationGenerator,
|
|
||||||
'vim': VimIntegrationGenerator,
|
'vim': VimIntegrationGenerator,
|
||||||
'debug': DebugIntegrationGenerator,
|
'debug': DebugIntegrationGenerator,
|
||||||
'qtcreator': QtCreatorIntegrationGenerator,
|
'qtcreator': QtCreatorIntegrationGenerator,
|
||||||
|
Reference in New Issue
Block a user