aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-05-08 02:42:27 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-05-08 02:42:27 +0300
commit6da948c3ce77afb0933a0958c43fed9428bcad15 (patch)
tree80896a8864e72f0bf9ba20b0c2b54b1546813b4c
parentworkflows: lint, tweak job names, etc. (diff)
downloadcmake-common-6da948c3ce77afb0933a0958c43fed9428bcad15.tar.gz
cmake-common-6da948c3ce77afb0933a0958c43fed9428bcad15.zip
project.toolset: tweak --help-toolsets output
-rw-r--r--project/toolset.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/project/toolset.py b/project/toolset.py
index a73a8d5..5c5c414 100644
--- a/project/toolset.py
+++ b/project/toolset.py
@@ -150,7 +150,7 @@ class ToolsetType(Enum):
def help(self):
if self is ToolsetType.AUTO:
- return "Most commonly means 'gcc' on Linux and 'msvc' on Windows."
+ return "Means 'gcc' on Linux and 'msvc' on Windows."
if self is ToolsetType.MSVC:
return 'Use cl.exe.'
if self is ToolsetType.VISUAL_STUDIO:
@@ -237,9 +237,12 @@ class ToolsetVersion:
'''
max_name = max((len(str(hint)) for hint in ToolsetType.all()))
+ max_help = max((len(hint.help()) for hint in ToolsetType.all()))
for hint in ToolsetType.all():
+ help = hint.help()
name_padding = ' ' * (max_name - len(str(hint)))
- s += f'| {hint}{name_padding} | {hint.help()}\n'
+ help_padding = ' ' * (max_help - len(str(help)))
+ s += f'| {hint}{name_padding} | {hint.help()}{help_padding} |\n'
return s
@staticmethod