summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-11-13 19:29:50 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-11-14 09:04:41 +0000
commit0956e2d9907c50169117b8df7aa8998c0c185879 (patch)
treead47425d75f3f3a9c7dc0773d37d952fb82dd0c9 /util
parent47428dfa55435e9b040243a0783f0f25a49c8e76 (diff)
pro2cmake: Allow limiting the number of projects to convert
Change-Id: I7c06d530cb98cc07e4a618427a7cf7b5c70aa171 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
Diffstat (limited to 'util')
-rwxr-xr-xutil/cmake/run_pro2cmake.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/util/cmake/run_pro2cmake.py b/util/cmake/run_pro2cmake.py
index 961e2931db..ce4a952f94 100755
--- a/util/cmake/run_pro2cmake.py
+++ b/util/cmake/run_pro2cmake.py
@@ -74,6 +74,18 @@ def parse_command_line() -> argparse.Namespace:
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="<path>", 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.")