summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-06-23 14:40:33 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-06-23 14:40:53 (GMT)
commit080e269f62712e00e422efbce2eb9aa64ebbf9ab (patch)
treede4d65dc24e27b1c021ce1d53233205d05cab192 /Utilities
parent9f60cdd2990966a7a48d444397aef01f9e0e10df (diff)
parentac89f9ec86ffc54f8a4081a7e0ec3fbcefb39f95 (diff)
downloadCMake-080e269f62712e00e422efbce2eb9aa64ebbf9ab.zip
CMake-080e269f62712e00e422efbce2eb9aa64ebbf9ab.tar.gz
CMake-080e269f62712e00e422efbce2eb9aa64ebbf9ab.tar.bz2
Merge topic 'sphinx-domain-parallel'
ac89f9ec86 Merge branch 'backport-3.26-sphinx-domain-parallel' f546ebfecc Utilities/Sphinx: Fix parallel documentation builds 4e11859e0e Utilities/Sphinx: Fix parallel documentation builds for 3.26 Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: technocolordreamcoder <j_grant5@u.pacific.edu> Merge-request: !8575
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/Sphinx/cmake.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/Utilities/Sphinx/cmake.py b/Utilities/Sphinx/cmake.py
index 0afd705..67dcec7 100644
--- a/Utilities/Sphinx/cmake.py
+++ b/Utilities/Sphinx/cmake.py
@@ -668,7 +668,7 @@ class CMakeDomain(Domain):
'manual': CMakeXRefRole(),
}
initial_data = {
- 'objects': {}, # fullname -> docname, objtype
+ 'objects': {}, # fullname -> ObjectEntry
}
def clear_doc(self, docname):
@@ -679,6 +679,20 @@ class CMakeDomain(Domain):
for fullname in to_clear:
del self.data['objects'][fullname]
+ def merge_domaindata(self, docnames, otherdata):
+ """Merge domaindata from the workers/chunks when they return.
+
+ Called once per parallelization chunk.
+ Only used when sphinx is run in parallel mode.
+
+ :param docnames: a Set of the docnames that are part of the current
+ chunk to merge
+ :param otherdata: the partial data calculated by the current chunk
+ """
+ for refname, obj in otherdata['objects'].items():
+ if obj.docname in docnames:
+ self.data['objects'][refname] = obj
+
def resolve_xref(self, env, fromdocname, builder,
typ, target, node, contnode):
targetid = f'{typ}:{target}'