diff --git a/util/cmake/run_pro2cmake.py b/util/cmake/run_pro2cmake.py index 961e2931db6..ce4a952f94b 100755 --- a/util/cmake/run_pro2cmake.py +++ b/util/cmake/run_pro2cmake.py @@ -73,6 +73,18 @@ def parse_command_line() -> argparse.Namespace: action="store_true", help="Run pro2cmake with --is-example flag.", ) + parser.add_argument( + "--count", + dest="count", + help="How many projects should be converted.", + type=int, + ) + parser.add_argument( + "--offset", + dest="offset", + help="From the list of found projects, from which project should conversion begin.", + type=int, + ) parser.add_argument( "path", metavar="", type=str, help="The path where to look for .pro files." ) @@ -214,7 +226,12 @@ def main() -> None: base_path = args.path all_files = find_all_pro_files(base_path, args) + if args.offset: + all_files = all_files[args.offset:] + if args.count: + all_files = all_files[:args.count] files_count = len(all_files) + failed_files = run(all_files, pro2cmake, args) if len(all_files) == 0: print("No files found.")