diff options
author | Eike Ziller <eike.ziller@qt.io> | 2020-05-14 08:49:47 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2020-05-15 12:50:24 +0000 |
commit | 7051ba84984b20676ef2de07349e56b0d7bdfa8c (patch) | |
tree | 5647ac8890af07e07537261475d6090ea50248b1 /scripts | |
parent | 921b56cd468b14f322cbb9e9441f1e32326b0b46 (diff) | |
download | qt-creator-7051ba84984b20676ef2de07349e56b0d7bdfa8c.tar.gz |
Build script: Add option for passing arguments to build command
So one can pass e.g. -j3 when locally testing while still doing other things
Change-Id: I7a528884f19698290e49c372eb31030afe609d23
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/build.py b/scripts/build.py index 8102224cd8..e7e414f508 100755 --- a/scripts/build.py +++ b/scripts/build.py @@ -87,6 +87,8 @@ def get_arguments(): action='store_true', default=False) parser.add_argument('--no-zip', help='Skip creation of 7zip files for install and developer package', action='store_true', default=False) + parser.add_argument('--add-make-arg', help='Passes the argument to the make tool.', + action='append', dest='make_args', default=[]) return parser.parse_args() def build_qtcreator(args, paths): @@ -137,7 +139,10 @@ def build_qtcreator(args, paths): '-DIDE_REVISION_URL=https://code.qt.io/cgit/qt-creator/qt-creator.git/log/?id=' + ide_revision] common.check_print_call(cmake_args + [paths.src], paths.build) - common.check_print_call(['cmake', '--build', '.'], paths.build) + build_args = ['cmake', '--build', '.'] + if args.make_args: + build_args += ['--'] + args.make_args + common.check_print_call(build_args, paths.build) if not args.no_docs: common.check_print_call(['cmake', '--build', '.', '--target', 'docs'], paths.build) |