From dea91729b6ec00c53d015d7df589f2df3176b7b8 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 7 May 2021 23:56:11 +0300 Subject: add --help-toolsets parameter Also, get rid of mentions of Visual Studio versions lower than 2010. --- project/boost/build.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'project/boost') diff --git a/project/boost/build.py b/project/boost/build.py index cb3688c..a192585 100644 --- a/project/boost/build.py +++ b/project/boost/build.py @@ -80,7 +80,9 @@ class BuildParameters: @staticmethod def from_cmd_args(args): - return BuildParameters(**vars(args)) + args = vars(args) + args.pop('help_toolsets', None) + return BuildParameters(**args) def enum_b2_args(self): with self._create_build_dir() as build_dir: @@ -140,6 +142,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) @@ -171,6 +177,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('--build', metavar='DIR', dest='build_dir', type=normalize_path, -- cgit v1.2.3