summaryrefslogtreecommitdiff
path: root/Utilities/Sphinx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2018-06-15 13:20:45 -0400
committerKyle Edwards <kyle.edwards@kitware.com>2018-06-21 11:00:25 -0400
commit2a2829cc75be0f8a5d7b48ac79f1f3cd53d8a54a (patch)
treedd2d8494ccbec274bb06d698f975cf7563d722e9 /Utilities/Sphinx
parentbe6267808a6b02c4125054d2fbcb81651b63e9aa (diff)
downloadcmake-2a2829cc75be0f8a5d7b48ac79f1f3cd53d8a54a.tar.gz
Help: Add new section for CPack generators
The documentation for CPack generators previously lived in their respective internal CMake modules. This setup was misleading, because it implied that you should include the modules in your own code, which is not the case. Moving the documentation into a separate section does a better job of hiding the internal modules, which are just an implementation detail. The generator documentation has also been modified to remove any references to the module name. The CPackIFW module is a special exception: since it has user-facing macros, the documentation for these macros has been kept in the module page, while all other documentation related to the IFW generator has been moved into the new section. To make it easier to find the new documentation, the old help pages for the CPack*.cmake modules have not been deleted, but have been replaced with a link to their respective help page in the new documentation section.
Diffstat (limited to 'Utilities/Sphinx')
-rw-r--r--Utilities/Sphinx/cmake.py3
-rwxr-xr-xUtilities/Sphinx/create_identifiers.py1
2 files changed, 4 insertions, 0 deletions
diff --git a/Utilities/Sphinx/cmake.py b/Utilities/Sphinx/cmake.py
index b0c8f71868..ebf44da45a 100644
--- a/Utilities/Sphinx/cmake.py
+++ b/Utilities/Sphinx/cmake.py
@@ -144,6 +144,7 @@ class _cmake_index_entry:
_cmake_index_objs = {
'command': _cmake_index_entry('command'),
+ 'cpack_gen': _cmake_index_entry('cpack generator'),
'envvar': _cmake_index_entry('envvar'),
'generator': _cmake_index_entry('generator'),
'manual': _cmake_index_entry('manual'),
@@ -325,6 +326,7 @@ class CMakeDomain(Domain):
label = 'CMake'
object_types = {
'command': ObjType('command', 'command'),
+ 'cpack_gen': ObjType('cpack_gen', 'cpack_gen'),
'envvar': ObjType('envvar', 'envvar'),
'generator': ObjType('generator', 'generator'),
'variable': ObjType('variable', 'variable'),
@@ -358,6 +360,7 @@ class CMakeDomain(Domain):
}
roles = {
'command': CMakeXRefRole(fix_parens = True, lowercase = True),
+ 'cpack_gen': CMakeXRefRole(),
'envvar': CMakeXRefRole(),
'generator': CMakeXRefRole(),
'variable': CMakeXRefRole(),
diff --git a/Utilities/Sphinx/create_identifiers.py b/Utilities/Sphinx/create_identifiers.py
index e638950041..6716b480d1 100755
--- a/Utilities/Sphinx/create_identifiers.py
+++ b/Utilities/Sphinx/create_identifiers.py
@@ -21,6 +21,7 @@ newlines = []
for line in lines:
mapping = (("command", "command"),
+ ("cpack generator", "cpack_gen"),
("envvar", "envvar"),
("variable", "variable"),
("generator", "generator"),