aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts
diff options
context:
space:
mode:
authorCristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2021-04-06 20:29:21 +0200
committerCristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2021-04-06 21:15:31 +0200
commitfbbae556c9bf060be366fd578986cae85ff8caec (patch)
tree68ed77bc0b6b3230d050749457304a0a54d688d6 /build_scripts
parent5109bcc49ee907d15c7e9735f8642f15bef90eb9 (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. Pick-to: 6.0 5.15 Change-Id: If78b19b9650b61b642e447b8c96b814e82994d7c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'build_scripts')
-rw-r--r--build_scripts/main.py22
1 files changed, 14 insertions, 8 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py
index f1c49dfca..b6d275f32 100644
--- a/build_scripts/main.py
+++ b/build_scripts/main.py
@@ -761,6 +761,8 @@ class PysideBuild(_build, DistUtilsCommandMixin):
cmake_cmd.append(f"-DQT_SRC_DIR={cmake_src_dir}")
if OPTION['NO_QT_TOOLS']:
cmake_cmd.append("-DNO_QT_TOOLS=yes")
+ if OPTION['SKIP_DOCS']:
+ cmake_cmd.append("-DSKIP_DOCS=yes")
log.info(f"Qt Source dir: {cmake_src_dir}")
if OPTION['AVOID_PROTECTED_HACK']:
@@ -859,15 +861,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(f"Configuring module {extension} ({module_src_dir})...")
@@ -897,6 +902,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(f"Installing module {extension}...")