aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/msvc_versions.yml24
-rw-r--r--project/toolset.py14
2 files changed, 18 insertions, 20 deletions
diff --git a/.github/workflows/msvc_versions.yml b/.github/workflows/msvc_versions.yml
index 2103165..91d49c9 100644
--- a/.github/workflows/msvc_versions.yml
+++ b/.github/workflows/msvc_versions.yml
@@ -13,21 +13,21 @@ jobs:
strategy:
matrix:
toolset:
- - msvc-140
- - msvc-141
- - msvc-142
- - vs-2015
- - vs-2017
- - vs-2019
+ - msvc140
+ - msvc141
+ - msvc142
+ - vs2015
+ - vs2017
+ - vs2019
include:
# Runner image.
- - {toolset: msvc-140, os: windows-2016}
- - {toolset: msvc-141, os: windows-2016}
- - {toolset: msvc-142, os: windows-2019}
- - {toolset: vs-2015, os: windows-2016}
- - {toolset: vs-2017, os: windows-2016}
- - {toolset: vs-2019, os: windows-2019}
+ - {toolset: msvc140, os: windows-2016}
+ - {toolset: msvc141, os: windows-2016}
+ - {toolset: msvc142, os: windows-2019}
+ - {toolset: vs2015, os: windows-2016}
+ - {toolset: vs2017, os: windows-2016}
+ - {toolset: vs2019, os: windows-2019}
# Boost version.
- boost-version: 1.72.0
diff --git a/project/toolset.py b/project/toolset.py
index 5c5c414..0f94949 100644
--- a/project/toolset.py
+++ b/project/toolset.py
@@ -206,8 +206,6 @@ class ToolsetType(Enum):
class ToolsetVersion:
- _VERSION_SEP = '-'
-
def __init__(self, hint, version):
self.hint = hint
self.version = version
@@ -215,7 +213,7 @@ class ToolsetVersion:
def __str__(self):
if self.version is None:
return str(self.hint)
- return f'{self.hint}{ToolsetVersion._VERSION_SEP}{self.version}'
+ return f'{self.hint}{self.version}'
@staticmethod
def default():
@@ -247,13 +245,13 @@ class ToolsetVersion:
@staticmethod
def help_versioned_toolsets():
- s = '''Some toolsets support specifying a version using the [-VERSION] suffix. This
-is a list of all supported toolset versions:
+ s = '''Some toolsets support specifying a version using the VERSION suffix. This is
+a list of all supported toolset versions:
'''
for hint in ToolsetType.all_versioned():
for version in hint.all_versions():
- s += f' * {hint}{ToolsetVersion._VERSION_SEP}{version}\n'
+ s += f' * {hint}{version}\n'
return s
@staticmethod
@@ -262,8 +260,8 @@ is a list of all supported toolset versions:
return ToolsetVersion(ToolsetType(s), None)
except ValueError:
pass
- for hint in ToolsetType.all_versioned():
- prefix = f'{hint}{ToolsetVersion._VERSION_SEP}'
+ for hint in sorted(ToolsetType.all_versioned(), key=str, reverse=True):
+ prefix = f'{hint}'
if s.startswith(prefix):
return ToolsetVersion(hint, hint.parse_version(s[len(prefix):]))
raise argparse.ArgumentTypeError(f'invalid toolset: {s}')