aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2018-05-15 13:23:49 +0200
committerCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2018-05-15 11:44:48 +0000
commit85dd5623f223ef2279e0660a90da4e78e7072830 (patch)
tree81d488e87efd80255a533ef1a1eaaa1c4ca89b00
parenta1d13bfe47c5b2b7ca2c915dca0094c1f8448deb (diff)
Add option --skip-modules
Allow the user to skip a set of modules when building the module. An example of using this option: --skip-modules=WebEngineCore,WebEngineWidgets,Multimedia Change-Id: I4b7a25acd60d068a886c1e716ddb7b226814b96f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r--build_scripts/main.py9
-rw-r--r--build_scripts/options.py1
-rw-r--r--setup.py3
-rw-r--r--sources/pyside2/CMakeLists.txt8
4 files changed, 21 insertions, 0 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index fd5998480..b22249abb 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -967,6 +967,15 @@ class pyside_build(_build):
moduleSubSet += ';'
moduleSubSet += m
cmake_cmd.append("-DMODULES={}".format(moduleSubSet))
+ if OPTION_SKIP_MODULES:
+ skip_modules = ''
+ for m in OPTION_SKIP_MODULES.split(','):
+ if m.startswith('Qt'):
+ m = m[2:]
+ if skip_modules:
+ skip_modules += ';'
+ skip_modules += m
+ cmake_cmd.append("-DSKIP_MODULES={}".format(skip_modules))
# Add source location for generating documentation
cmake_src_dir = OPTION_QT_SRC if OPTION_QT_SRC else qtSrcDir
cmake_cmd.append("-DQT_SRC_DIR={}".format(cmake_src_dir))
diff --git a/build_scripts/options.py b/build_scripts/options.py
index 6472c664d..80c9041e4 100644
--- a/build_scripts/options.py
+++ b/build_scripts/options.py
@@ -72,6 +72,7 @@ OPTION_REUSE_BUILD = has_option("reuse-build")
OPTION_SKIP_CMAKE = has_option("skip-cmake")
OPTION_SKIP_MAKE_INSTALL = has_option("skip-make-install")
OPTION_SKIP_PACKAGING = has_option("skip-packaging")
+OPTION_SKIP_MODULES = option_value("skip-modules")
OPTION_MODULE_SUBSET = option_value("module-subset")
OPTION_RPATH_VALUES = option_value("rpath")
OPTION_QT_CONF_PREFIX = option_value("qt-conf-prefix")
diff --git a/setup.py b/setup.py
index 5c494eb92..6a0e02706 100644
--- a/setup.py
+++ b/setup.py
@@ -116,6 +116,9 @@ using `setup.py build`:
--module-subset allows for specifying the Qt modules to be built.
A minimal set is: --module-subset=Core,Gui,Test,Widgets
+ --skip-modules allows for specifying the Qt modules that will be
+ skipped during the build process.
+ For example: --skip-modules=WebEngineCore,WebEngineWidgets
--reuse-build option allows recompiling only the modified sources and
not the whole world, shortening development iteration time,
--skip-cmake will reuse the already generated Makefiles (or
diff --git a/sources/pyside2/CMakeLists.txt b/sources/pyside2/CMakeLists.txt
index 151d37f8b..e1ef529aa 100644
--- a/sources/pyside2/CMakeLists.txt
+++ b/sources/pyside2/CMakeLists.txt
@@ -353,6 +353,14 @@ if (NOT MODULES)
set(MODULES "${ALL_ESSENTIAL_MODULES};${ALL_OPTIONAL_MODULES}")
endif()
+# Removing from the MODULES list the items that were defined with
+# -DSKIP_MODULES on command line
+if (SKIP_MODULES)
+ foreach(s ${SKIP_MODULES})
+ list(REMOVE_ITEM MODULES ${s})
+ endforeach()
+endif()
+
foreach(m ${MODULES})
COLLECT_MODULE_IF_FOUND(${m})
endforeach()