diff options
author | Cristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2021-04-06 20:29:21 +0200 |
---|---|---|
committer | Cristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2021-05-06 17:50:05 +0200 |
commit | 60681bbda7df61cb42f1411aaeb07a0b5b055fea (patch) | |
tree | 0275587bd26dcf8a32bb953af2140a459a79c950 /build_scripts | |
parent | 8b9cfcb2da0b3a561777de5edf1522865decf48d (diff) |
doc: make sure '--skip-docs' skip the docs
Even when using the code, some portions
of the cmake file in sources/pyside6/doc/
was still being executed.
This makes sure everything is skipped if we use
the '--skip-docs' option when building.
Change-Id: If78b19b9650b61b642e447b8c96b814e82994d7c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit fbbae556c9bf060be366fd578986cae85ff8caec)
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'build_scripts')
-rw-r--r-- | build_scripts/main.py | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py index 86b9cbbbc..461e5a712 100644 --- a/build_scripts/main.py +++ b/build_scripts/main.py @@ -805,6 +805,8 @@ class PysideBuild(_build, DistUtilsCommandMixin): # Add source location for generating documentation cmake_src_dir = OPTION["QT_SRC"] if OPTION["QT_SRC"] else qt_src_dir cmake_cmd.append("-DQT_SRC_DIR={}".format(cmake_src_dir)) + if OPTION['SKIP_DOCS']: + cmake_cmd.append("-DSKIP_DOCS=yes") log.info("Qt Source dir: {}".format(cmake_src_dir)) if self.build_type.lower() == 'debug': @@ -905,15 +907,18 @@ class PysideBuild(_build, DistUtilsCommandMixin): cmake_cmd.append("-DCMAKE_C_COMPILER=cl.exe") cmake_cmd.append("-DCMAKE_CXX_COMPILER=cl.exe") - if OPTION["DOC_BUILD_ONLINE"]: - log.info("Output format will be HTML") - cmake_cmd.append("-DDOC_OUTPUT_FORMAT=html") - else: - log.info("Output format will be qthelp") - cmake_cmd.append("-DDOC_OUTPUT_FORMAT=qthelp") + if not OPTION["SKIP_DOCS"]: + # Build the whole documentation (rst + API) by default + cmake_cmd.append("-DFULLDOCSBUILD=1") - # Build the whole documentation (rst + API) by default - cmake_cmd.append("-DFULLDOCSBUILD=1") + if OPTION["DOC_BUILD_ONLINE"]: + log.info("Output format will be HTML") + cmake_cmd.append("-DDOC_OUTPUT_FORMAT=html") + else: + log.info("Output format will be qthelp") + cmake_cmd.append("-DDOC_OUTPUT_FORMAT=qthelp") + else: + cmake_cmd.append("-DSKIP_DOCS=1") if not OPTION["SKIP_CMAKE"]: log.info("Configuring module {} ({})...".format(extension, module_src_dir)) @@ -951,6 +956,7 @@ class PysideBuild(_build, DistUtilsCommandMixin): log.info("Sphinx not found, skipping documentation build") else: log.info("Skipped documentation generation") + cmake_cmd.append("-DSKIP_DOCS=1") if not OPTION["SKIP_MAKE_INSTALL"]: log.info("Installing module {}...".format(extension)) |