summaryrefslogtreecommitdiffstats
path: root/Utilities/Sphinx
Commit message (Collapse)AuthorAgeFilesLines
* Utilities/Sphinx: Tell linkcheck to not treat timeouts as brokenBrad King2024-10-261-0/+2
| | | | | | | | | | Sphinx 7.3 warns: sphinx/builders/linkcheck.py:86: RemovedInSphinx80Warning: The default value for 'linkcheck_report_timeouts_as_broken' will change to False in Sphinx 8, ... Configure that behavior explicitly.
* Configure CMake itself with policies through CMake 3.29Brad King2024-06-051-1/+1
|
* FindOpenMP: Add option to control OpenMP runtime with MSVCAxel Huebl2024-05-011-0/+1
| | | | | | | The MSVC compiler's `-openmp` flag accepts `:{experimental,llvm}` values. Add an option to specify one. Closes: #25570
* Utilities/Sphinx: Ignore warning in generated texinfo documentationBrad King2024-04-241-0/+1
|
* Configure CMake itself with policies through CMake 3.28Brad King2024-02-061-1/+1
|
* Merge branch 'backport-ci-fedora-39' into ci-fedora-39Brad King2023-11-171-1/+1
|\
| * Utilities/Sphinx: Fix python string literal syntax warningBrad King2023-11-171-1/+1
| | | | | | | | | | | | | | | | Python 3.12 started warning: conf.py:35: SyntaxWarning: invalid escape sequence '\.' Use a raw string literal instead.
* | Merge topic 'doc-deprecated-hanging-indent'Brad King2023-11-171-3/+5
|\ \ | |/ | | | | | | | | | | b553ac4c2f Utilities/Sphinx: Add hanging indent to deprecation notes Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8976
| * Utilities/Sphinx: Add hanging indent to deprecation notesBrad King2023-11-161-3/+5
| | | | | | | | | | | | Extend commit 038f4c12e3 (Utilities/Sphinx: Add hanging indent to version notes, 2023-03-14, v3.27.0-rc1~322^2) to cover `deprecated` directives.
* | ci: Do not linkcheck www.intel.com URLsBrad King2023-11-061-1/+5
| | | | | | | | | | They fail with a 403 Client Error, perhaps due to our once-per-day request being classified as scraping.
* | Configure CMake itself with policies through CMake 3.27Brad King2023-10-031-1/+1
|/
* Utilities/Sphinx: Allow linkcheck redirect for our get-involved pageBrad King2023-09-281-0/+1
| | | | | | The `cmake.org/get-involved` URL is more semantically meaningful than the `cmake.org/documentation` URL to which the former now redirects as an implementation detail.
* Merge topic 'doc-search-names'Brad King2023-07-141-1/+1
|\ | | | | | | | | | | | | 094c5a089d Utilities/Sphinx: Restore html search index link anchors Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8628
| * Utilities/Sphinx: Restore html search index link anchorsBrad King2023-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 37e015d4a6 (Utilities/Sphinx: Refactor Sphinx reference recording, 2023-03-08, v3.27.0-rc1~342^2~1), anchors in links to cmake domain objects generated in html search results were missing their object type prefix, and thus did not link to the object. Restore our `get_objects` implementation's second tuple entry to what we used prior to that commit. This matches what Sphinx's builtin python, rst, and javascript modes do. Fixes: #25067
| * Merge topic 'sphinx-docutils-warning' into release-3.27Brad King2023-06-231-1/+12
| |\ | | | | | | | | | | | | | | | | | | 0c14b6085a Utilities/Sphinx: Fix warning from docutils 0.18.1+ Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8578
* | \ Merge topic 'sphinx-docutils-warning'Brad King2023-06-231-1/+12
|\ \ \ | | |/ | |/| | | | | | | | | | | | | 0c14b6085a Utilities/Sphinx: Fix warning from docutils 0.18.1+ Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8578
| * | Utilities/Sphinx: Fix warning from docutils 0.18.1+Henry Schreiner2023-06-221-1/+12
| | | | | | | | | | | | | | | Also might fix 0.18.0 exactly, which apparently forgot to add the backward compat shim.
* | | Merge topic 'sphinx-domain-parallel'Brad King2023-06-231-1/+15
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | 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
| * | Utilities/Sphinx: Fix parallel documentation buildsMatthew Woehlke2023-06-221-1/+15
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit d78bfa1ecc (Utilities/Sphinx: support cmakedomain running in parallel, 2022-10-24, v3.26.0-rc1~495^2) we declared the domain as parallel-safe without actually implementing the required `merge_domaindata` method. Since then, commit 37e015d4a6 (Utilities/Sphinx: Refactor Sphinx reference recording) changed how we store resolved references, such that our separate fix for 3.26 does not work in 3.27+. While at it, correct a crusty comment that was overlooked during the aforementioned refactoring. Issue: #24076 Co-authored-by: Jared Dillard <jared.dillard@gmail.com>
* | Merge topic 'improve-sphinx-check'Brad King2023-06-142-23/+19
|\ \ | |/ | | | | | | | | | | | | 528cdc7551 Utilities/Sphinx: Fix some flake8 gripes 4bd1beded4 Utilities/Sphinx: Don't ignore flake8 E402 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8561
| * Utilities/Sphinx: Fix some flake8 gripesMatthew Woehlke2023-06-131-7/+6
| | | | | | | | Reorder some imports to better conform to what flake8 wants.
| * Utilities/Sphinx: Don't ignore flake8 E402Matthew Woehlke2023-06-132-21/+18
| | | | | | | | | | | | | | | | Refactor commit 1f39a3cd1a (Utilities/Sphinx: Restore explicit check for Sphinx 2.x or later) to avoid needing to suppress flake8 E402. While ignoring it with respect to the docutils/sphinx imports and the sphinx version check was correct, the need to disable it for the whole file was suboptimal.
* | Merge topic 'doc-sphinx-2.x'Brad King2023-06-132-4/+9
|\ \ | |/ | | | | | | | | | | | | 1f39a3cd1a Utilities/Sphinx: Restore explicit check for Sphinx 2.x or later 5de805bea2 Utilities/Sphinx: Fix flake8 E124 diagnostic in cmake.py Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8555
| * Utilities/Sphinx: Restore explicit check for Sphinx 2.x or laterBrad King2023-06-122-3/+8
| | | | | | | | | | | | | | | | Refactoring in commit adbc8c982d (Utilities/Sphinx: Fix flake8 gripes in cmake.py, 2023-03-13, v3.27.0-rc1~317^2) moved the assertion added by commit cef51925a4 (Utilities/Sphinx: Require Sphinx 2.x or later, 2023-03-13, v3.27.0-rc1~317^2~2) to after imports, which is too late to clearly reject older Sphinx versions.
| * Utilities/Sphinx: Fix flake8 E124 diagnostic in cmake.pyBrad King2023-06-121-1/+1
| |
* | Configure CMake itself with policies through CMake 3.26Brad King2023-06-071-1/+1
|/
* Sphinx: Modernize UTF-8 encoding handling when updating CMake.qhpCraig Scott2023-04-071-4/+4
|
* Sphinx: Specify encoding when opening files for title extractionCraig Scott2023-04-071-2/+3
| | | | | | | | | | When the encoding is not specified, open() may choose an encoding based on the locale in use. That encoding may have no relationship to the encoding of the file being opened. Use the locale from the document settings instead, which should better match the file's encoding. Fixes: #24679
* Utilities/Sphinx: Fix flake8 gripes in cmake.pyMatthew Woehlke2023-03-151-42/+87
| | | | | | | | Edit Utilities/Sphinx/cmake.py to avoid lines longer than 79 characters and to obey other flake8-checked style rules. This will allow using flake8 to check for possible issues without having to wade through noise about improper styling. (Also, of course, consistent styling is beneficial in its own right.)
* Utilities/Sphinx: Use f-strings in cmake.pyMatthew Woehlke2023-03-151-16/+15
| | | | | | | | | Port all uses of old-style % string formatting to use f-strings. These are generally more readable (and tend to be shorter as well). Although this requires Python 3.6 or later, that should be available 'stock' on most or all platforms still under support, and besides, we were already using f-strings in some places.
* Utilities/Sphinx: Require Sphinx 2.x or laterMatthew Woehlke2023-03-151-36/+6
| | | | | | | Tweak our Sphinx extensions slightly to assert that Sphinx is at least 2.x. Remove hacks for older versions of Sphinx. This cleans up a bunch of messy code and, more importantly, paves the way for consolidating our import statements.
* Utilities/Sphinx: Add 'cref' roleMatthew Woehlke2023-03-141-1/+18
| | | | | | | | | | | | | Add a role that can be used to create local links (a la '`LINK`_'), but that also applies literal style. This is particularly useful for referring to subcommands within the command's documentation in a style that is consistent with ':command:`BAR <foo(BAR)>`' but is much less verbose. Although this is intended for subcommands, it works with any local reference. Co-authored-by: Brad King <brad.king@kitware.com>
* Utilities/Sphinx: Factor out part of CMakeXRefRoleMatthew Woehlke2023-03-141-13/+29
| | | | | | | Refactor the portion of CMakeXRefRole that escapes angle brackets in reference titles to the equivalent of a C++ template class. This will allow us to reuse that logic for reference roles that aren't derived from XRefRole.
* Merge topic 'version-hanging-indent'Brad King2023-03-141-0/+11
|\ | | | | | | | | | | | | 038f4c12e3 Utilities/Sphinx: Add hanging indent to version notes Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8325
| * Utilities/Sphinx: Add hanging indent to version notesMatthew Woehlke2023-03-141-0/+11
| | | | | | | | | | | | | | Tweak HTML styling of version-{added,changed} notes to include a hanging indent. This makes it more obvious what text is part of such a note in cases where the note is lengthy (especially if more than one paragraph), rather than the relevant text blending into the surrounding prose.
* | Utilities/Sphinx: Restore trailing parens on command cross-referencesBrad King2023-03-141-3/+8
|/ | | | | | | | | | Since commit cc21d0e478 (Utilities/Sphinx: Make signatures linkable, 2023-03-09) we always convert `cmake:command` domain cross-references to use the explicit `text <text>` form. This breaks the XRefRole's `fix_parens` setting that we use to render `cmd` as `cmd()`. Instead, transform `cmd(sub)` to `cmd(sub) <cmd(sub)>` to preserve the sub-command link destination, but leave `cmd` alone and let XRefRole convert it to `cmd()`.
* Merge topic 'smart-wrap-signatures'Brad King2023-03-142-12/+76
|\ | | | | | | | | | | | | 39ecaa5da1 Utilities/Sphinx: Improve word wrap of signatures Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8317
| * Utilities/Sphinx: Improve word wrap of signaturesMatthew Woehlke2023-03-132-12/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement logic to support several styles of parsing in the new signature directive that control where line breaks are allowed in a signature. The default is 'smart', which forbids breaks inside of square- or angle-brackets. The 'verbatim' option forbids all breaks. In all cases, breaks are always allowed where a newline appears in the source. This seems to Just Work for most writers, but HTML needs some special handling that is accomplished by a new CSS rule and assigning the 'nbsp' class to spaces that are not allowed to break. (ROFF's line wrapping is rather unfortunate here, as it prefers splitting and hyphenating words rather than breaking at a space.)
* | Utilities/Sphinx: Allow explicit target for genexMatthew Woehlke2023-03-131-5/+29
|/ | | | | | | | | | | | | | | | Split the genex directive into its own class, allowing a slight simplification of CMakeObject. Add ability to specify an explicit target name for the same. Use this to provide a target for the `$<TARGET_PROPERTY:prop>` generator expression which is otherwise missing one (due to overlap with `$<TARGET_PROPERTY:tgt,prop>`). With this one can write: :genex:`$<TARGET_PROPERTY:prop> <TARGET_PROPERTY:prop>` to link the second variant. Fixes: #24573
* Utilities/Sphinx: Make signatures linkableMatthew Woehlke2023-03-091-10/+29
| | | | | | | | | | | Add signatures to the collection of observed objects (which can be referenced elsewhere). Don't automatically strip parameters from a :command: reference, as these may now link signatures. (Do, however, munge them into 'text <ref>' form if they aren't already, as not doing so adds an extra '()' for some reason.) Correspondingly, change xref resolution to try to match 'command' when a ref like 'command(args)' is not matched, so that existing links to commands that have not been converted to use the new signature directive don't immediately break.
* Utilities/Sphinx: Refactor Sphinx reference recordingMatthew Woehlke2023-03-081-18/+39
| | | | | | | | | Rewrite how we record objects in our Sphinx extensions to more closely conform to how other domains do likewise, and to store more information than was previously being stored. This is a first step toward being able to record and reference signatures.
* Utilities/Sphinx: Add a directive to document command signaturesMatthew Woehlke2023-03-032-3/+105
| | | | | | | Add a `signature` directive to offer a CMake version of Sphinx's `function` directive, similar to that found in other domains (py, cpp, etc.). Like others, this takes one or more signatures as arguments and creates dt/dd nodes from the signatures and the directive contents.
* Utilities/Sphinx: Drop commented-out code from cmake domain implBrad King2023-02-241-12/+1
| | | | Inspired-by: Alex Turbov <i.zaufi@gmail.com>
* Utilities/Sphinx: Configure linkcheck allowed permanent redirectsBrad King2023-02-171-0/+8
| | | | | Some permanent redirects are part of the structure of their site to make URLs look nicer. Allow them.
* Configure CMake itself with policies through CMake 3.25Brad King2023-02-011-1/+1
|
* Merge topic 'doc-guide-link-style'Brad King2022-11-091-0/+11
|\ | | | | | | | | | | | | 977c38c339 Help: Render guide links as normal text instead of monospace Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7886
| * Help: Render guide links as normal text instead of monospaceAlex Turbov2022-11-081-0/+11
| | | | | | | | | | The guide document names are phrases, not code-like man-page names. Add CSS selectors for `:guide:` links and revert unnecessary properties.
* | Build: Add `SPHINX_LINKCHECK` build optionAlex Turbov2022-11-072-1/+19
| | | | | | | | Run `sphinx-build` to check external links and report broken one.
* | Build: Do not redirect `sphinx-build` output if CMake running in verbose modeAlex Turbov2022-11-071-3/+34
| | | | | | | | | | | | | | | | | | Configuring with `--log-level=VERBOSE` a user can see an output of `sphinx-build` at build time. The other way is to have `VERBOSE` envvar set at configure time. And finally one can set `CMAKE_VERBOSE_MAKEFILE` CMake cache variable.
* | Build: Deduplicate `add_custom_command()` calls for Sphinx targetsAlex Turbov2022-11-071-32/+25
| |