diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-12-15 20:10:48 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-12-15 20:19:56 +0300 |
commit | d021eae1cf9806282745935391a5ca282f4b5999 (patch) | |
tree | 11f7eaf21628681296559ad97777405377386cde /project | |
parent | v3.3 (diff) | |
download | cmake-common-d021eae1cf9806282745935391a5ca282f4b5999.tar.gz cmake-common-d021eae1cf9806282745935391a5ca282f4b5999.zip |
support VS 2022
Diffstat (limited to 'project')
-rw-r--r-- | project/toolset.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/project/toolset.py b/project/toolset.py index 136e6dd..001eefb 100644 --- a/project/toolset.py +++ b/project/toolset.py @@ -49,6 +49,7 @@ class MSVCVersion(Enum): VS2015 = '140' VS2017 = '141' VS2019 = '142' + VS2022 = '143' def __str__(self): return str(self.value) @@ -66,6 +67,8 @@ class MSVCVersion(Enum): return 'Visual Studio 2017' if self is MSVCVersion.VS2019: return 'Visual Studio 2019' + if self is MSVCVersion.VS2022: + return 'Visual Studio 2022' raise NotImplementedError(f'unsupported MSVC version: {self}') @staticmethod @@ -95,6 +98,8 @@ class MSVCVersion(Enum): return VisualStudioVersion.VS2017 if MSVCVersion.VS2019: return VisualStudioVersion.VS2019 + if MSVCVersion.VS2022: + return VisualStudioVersion.VS2022 raise NotImplementedError(f'unsupported MSVC version: {self}') def to_boost_msvc_version(self): @@ -117,6 +122,7 @@ class VisualStudioVersion(Enum): VS2015 = '2015' VS2017 = '2017' VS2019 = '2019' + VS2022 = '2022' def __str__(self): return str(self.value) @@ -134,6 +140,8 @@ class VisualStudioVersion(Enum): return f"Same as '{ToolsetType.MSVC}{MSVCVersion.VS2017}'" if self is VisualStudioVersion.VS2019: return f"Same as '{ToolsetType.MSVC}{MSVCVersion.VS2019}'" + if self is VisualStudioVersion.VS2022: + return f"Same as '{ToolsetType.MSVC}{MSVCVersion.VS2022}'" raise NotImplementedError(f'unsupported Visual Studio version: {self}') @staticmethod @@ -160,6 +168,8 @@ class VisualStudioVersion(Enum): return MSVCVersion.VS2017 if self is VisualStudioVersion.VS2019: return MSVCVersion.VS2019 + if self is VisualStudioVersion.VS2022: + return MSVCVersion.VS2022 raise NotImplementedError(f'unsupported Visual Studio version: {self}') def to_visual_studio_version(self): |