MSVC compiler: add platform toolset version (#35098)

This commit is contained in:
John W. Parent 2023-02-03 20:53:24 -05:00 committed by GitHub
parent 509a8ea5e2
commit 1826a41cdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,11 +103,22 @@ def short_msvc_version(self):
""" """
This is the shorthand VCToolset version of form This is the shorthand VCToolset version of form
MSVC<short-ver> *NOT* the full version, for that see MSVC<short-ver> *NOT* the full version, for that see
Msvc.msvc_version Msvc.msvc_version or MSVC.platform_toolset_ver for the
raw platform toolset version
""" """
ver = self.msvc_version[:2].joined.string[:3] ver = self.platform_toolset_ver
return "MSVC" + ver return "MSVC" + ver
@property
def platform_toolset_ver(self):
"""
This is the platform toolset version of current MSVC compiler
i.e. 142.
This is different from the VC toolset version as established
by `short_msvc_version`
"""
return self.msvc_version[:2].joined.string[:3]
@property @property
def cl_version(self): def cl_version(self):
"""Cl toolset version""" """Cl toolset version"""