aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-06-29 10:45:54 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-06-30 16:57:15 +0200
commitb2401231c0e6938c43f48fe90db8f775aeb04103 (patch)
tree341a04d55126a37f91efda714a08e43e2ff78744
parent63462f2c1bc49663dbe9bbfe786f9345c5d3f76b (diff)
qp5_tool.py: Add an configuration key for the CMake generator
Add a key Generator (similar to the planned qt6_tool). Currently, only default (make) and Ninja are supported (pending the refactoring of the mkspec option of setup.py, which will become a qmake legacy). Task-number: PYSIDE-904 Change-Id: I75f87c59f8b6421dc5d2b8ae46d3107e2ac61614 Reviewed-by: Christian Tismer <tismer@stackless.com>
-rw-r--r--build_scripts/qp5_tool.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/build_scripts/qp5_tool.py b/build_scripts/qp5_tool.py
index 9fc37a99..6871bb34 100644
--- a/build_scripts/qp5_tool.py
+++ b/build_scripts/qp5_tool.py
@@ -68,6 +68,8 @@ Modules-pyside-setup512=Core,Gui,Widgets,Network,Test
Configuration keys:
Acceleration Incredibuild or unset
BuildArguments Arguments to setup.py
+Generator Generator to be used for CMake. Currently, only Ninja is
+ supported.
Jobs Number of jobs to be run simultaneously
Modules Comma separated list of modules to be built
(for --module-subset=)
@@ -99,6 +101,7 @@ INCREDIBUILD_CONSOLE = 'BuildConsole' if IS_WINDOWS else '/opt/incredibuild/bin/
# Config file keys
ACCELERATION_KEY = 'Acceleration'
BUILDARGUMENTS_KEY = 'BuildArguments'
+GENERATOR_KEY = 'Generator'
JOBS_KEY = 'Jobs'
MODULES_KEY = 'Modules'
PYTHON_KEY = 'Python'
@@ -304,6 +307,9 @@ def build(target):
arguments.append('--avoid') # caching, v0.96.74
arguments.extend([read_config_python_binary(), 'setup.py', target])
arguments.extend(read_config_build_arguments())
+ generator = read_config(GENERATOR_KEY)
+ if generator == 'Ninja':
+ arguments.extend(['--make-spec', 'ninja'])
jobs = read_int_config(JOBS_KEY)
if jobs > 1:
arguments.extend(['-j', str(jobs)])