diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-05-08 02:42:27 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-05-08 02:42:27 +0300 |
commit | 6da948c3ce77afb0933a0958c43fed9428bcad15 (patch) | |
tree | 80896a8864e72f0bf9ba20b0c2b54b1546813b4c | |
parent | workflows: lint, tweak job names, etc. (diff) | |
download | cmake-common-6da948c3ce77afb0933a0958c43fed9428bcad15.tar.gz cmake-common-6da948c3ce77afb0933a0958c43fed9428bcad15.zip |
project.toolset: tweak --help-toolsets output
-rw-r--r-- | project/toolset.py | 7 |
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 |