From fbbae556c9bf060be366fd578986cae85ff8caec Mon Sep 17 00:00:00 2001 From: Cristian Maureira-Fredes Date: Tue, 6 Apr 2021 20:29:21 +0200 Subject: 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 --- build_scripts/main.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'build_scripts') 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}...") -- cgit v1.2.3