aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/project/cmake/build.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-05-07 23:56:11 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-05-08 00:02:06 +0300
commitdea91729b6ec00c53d015d7df589f2df3176b7b8 (patch)
treedd825359e62d4e2f29676627f3dc46281ae563d2 /project/cmake/build.py
parentproject.toolset: move _full_exe_name to utils (diff)
downloadcmake-common-dea91729b6ec00c53d015d7df589f2df3176b7b8.tar.gz
cmake-common-dea91729b6ec00c53d015d7df589f2df3176b7b8.zip
add --help-toolsets parameter
Also, get rid of mentions of Visual Studio versions lower than 2010.
Diffstat (limited to 'project/cmake/build.py')
-rw-r--r--project/cmake/build.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/project/cmake/build.py b/project/cmake/build.py
index c9e798b..c02f102 100644
--- a/project/cmake/build.py
+++ b/project/cmake/build.py
@@ -157,7 +157,9 @@ class BuildParameters:
@staticmethod
def from_args(args):
- return BuildParameters(**vars(args))
+ args = vars(args)
+ args.pop('help_toolsets', None)
+ return BuildParameters(**args)
@contextmanager
def create_build_dir(self):
@@ -196,6 +198,10 @@ def _parse_args(argv=None):
if argv is None:
argv = sys.argv[1:]
+ if '--help-toolsets' in argv:
+ sys.stdout.write(ToolsetVersion.help_toolsets())
+ sys.exit(0)
+
parser = argparse.ArgumentParser(
description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter)
@@ -224,6 +230,8 @@ def _parse_args(argv=None):
parser.add_argument('--toolset', metavar='TOOLSET', dest='toolset_version',
type=ToolsetVersion.parse, default=DEFAULT_TOOLSET_VERSION,
help=f'toolset to use ({ToolsetVersion.usage()})')
+ parser.add_argument('--help-toolsets', action='store_true',
+ help='show detailed info about supported toolsets')
parser.add_argument('src_dir', metavar='DIR',
type=normalize_path,