Commit Graph

108 Commits

Author SHA1 Message Date
Brad King
a541c8f510 Utilities/Sphinx: Ignore warning in generated texinfo documentation 2022-02-01 17:20:28 -05:00
Brad King
40ade51cc8 Configure CMake itself with policies through CMake 3.21 2021-10-08 12:17:04 -04:00
Arcturus Arcturus
1d03aa841c Utilities/Sphinx: Print path to index.html in build output
Print the url to index.html in the build output, just so one can
"open in browser" from the context menu in some terminals.
2021-10-04 11:33:42 -04:00
Brad King
2c209097b9 Configure CMake itself with policies through CMake 3.20 2021-06-30 10:13:56 -04:00
Brad King
8406d4c1d1 Utilities/Sphinx: Index guide section documents for cross-referencing
Extend the change from commit 6185265800 (Utilities/Sphinx: Index
guide-level documents for cross-referencing, 2019-12-06,
v3.17.0-rc1~181^2~1) to name guide documents other than the top level
using their docname instead of their title.  This will allow them to be
cross-referenced by a stable name even if their title changes.
2021-06-17 09:55:56 -04:00
Brad King
fa8599e9a6 Merge topic 'sphinx-4'
bb9c69ed70 Utilities/Sphinx: Update man page config for Sphinx 4

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6126
2021-05-14 10:55:16 -04:00
Brad King
bb9c69ed70 Utilities/Sphinx: Update man page config for Sphinx 4
Sphinx 4 by default generates `man/#/foo.#`, but older versions generate
`man/foo.#` as our install rules expect.  Update our Sphinx config file
to tell Sphinx 4 to use the old layout.

Fixes: #22192
2021-05-14 10:30:34 -04:00
Josef Angstenberger
6dd719a4a5 Utilities: Fix typos and spelling in comments 2021-05-07 17:00:13 +02:00
Henryk Paluch
5302073010 Help: Add option to generate docs with latexpdf 2021-03-01 15:28:10 -05:00
Brad King
91b4c27d8a Merge topic 'doc-presets'
47ab2d4d2e Help: Clarify role of binaryDir inheritance in cmake-presets(7)
0e3c361f77 Help: Link to tool-specific preset arguments from cmake-presets(7)
dd6165fbd4 Help: Mention version 2 in cmake-presets(7)
cdbd1ae64b Utilities/Sphinx: Avoid converting -- to an en-dash

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5829
2021-02-18 14:35:36 -05:00
Brad King
cdbd1ae64b Utilities/Sphinx: Avoid converting -- to an en-dash 2021-02-18 10:55:09 -05:00
Brad King
e517c1beb6 Configure CMake itself with policies through CMake 3.19 2021-02-10 09:26:29 -05:00
Brad King
7d498d6b43 Utilities/Sphinx: Add role and directive for 'genex' in CMake domain
This enables cross-reference syntax for CMake generator expressions:

    :genex:`SOME_GENEX`
    :genex:`$<SOME_GENEX>`
    :genex:`$<SOME_GENEX:...>`

and definition of CMake generator expressions via a directive:

    .. genex:: SOME_GENEX
    .. genex:: $<SOME_GENEX>
    .. genex:: $<SOME_GENEX:...>

It also adds generator expressions defined by the directive and by
`Help/genex/SOME_GENEX.rst` documents to the index.
2021-01-18 12:35:41 -05:00
Nikita Nemkin
dafcef8b50 Help: Improve styling for versionadded/deprecated directives
Sphinx theme CSS removes top margin for dd > p combination,
but directives add an intervening div and need a separate rule.

Issue: #19715
2020-12-02 21:00:28 +05:00
Brad King
3f60c92775 Merge topic 'doc-html-lang'
f25e4313ac Utilities/Sphinx: Tell Sphinx that documentation is written in English

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5480
2020-11-09 10:51:08 -05:00
Brad King
f25e4313ac Utilities/Sphinx: Tell Sphinx that documentation is written in English
Fixes: #21409
2020-11-09 10:15:35 -05:00
Brad King
a0e474aaf2 Configure CMake itself with policies through CMake 3.18 2020-10-13 14:42:08 -04:00
Brad King
2254fcb68f Utilities/Sphinx: Avoid using deprecated sphinx APIs
Sphinx has deprecated `sphinx.util.pycompat.htmlescape` and
`sphinx.builders.qthelp.QtHelpBuilder`.  We only import these as part of
a monkey-patch to work around a bug in versions of sphinx before 1.7.2,
so make that code path conditional.  The imports are not deprecated on
the versions where we need them.
2020-10-05 13:38:08 -04:00
Brad King
e0f643dddc Utilities/Sphinx: Clarify check for sphinx < 1.4 2020-10-05 13:37:01 -04:00
Nikita Nemkin
dbd453c2ff Utilities/Sphinx: Add script for inserting ".. versionadded" directive 2020-07-03 20:14:31 +05:00
Rolf Eike Beer
42dcc2bd51 CTestConfig: allow nightly build submission using https
The idea is that one may set `CTEST_DROP_METHOD` in custom CTest
scripting.
2020-06-09 09:33:01 -04:00
Ben Boeckel
c540fcaa6b Sphinx/create_identifiers: handle qhp contents as utf-8 2020-06-03 11:51:21 -04:00
Ben Boeckel
e237fc65b7 Sphinx/create_identifiers: use not in not not _ in 2020-06-03 11:40:47 -04:00
Ben Boeckel
0aa061f6f8 Sphinx/create_identifiers: remove unused import 2020-06-03 11:40:47 -04:00
Ben Boeckel
758ab4dbd3 Utilities/Sphinx: allow CDash submission for the standalone build 2020-05-07 13:25:57 -04:00
Ben Boeckel
16de8e3544 Utilities/Sphinx: support finding Qt5's qcollectiongenerator too 2020-05-07 13:25:57 -04:00
Brad King
6185265800 Utilities/Sphinx: Index guide-level documents for cross-referencing
Extend the change from commit d2fde94809 (Help: Add infrastructure for
guide-level documentation, 2019-05-30, v3.16.0-rc1~531^2~4) to add
support for cross-referencing and indexing the guides.
2020-01-13 11:08:11 +00:00
Brad King
b1b7d01172 Utilities/Sphinx: Index document types only by top level directory
We use the convention `Help/<type>/<doc>` for indexing each document as
an object of type `<type>`.  Split the document name on the first slash
rather than the last slash so that multi-level documents like
`Help/guide/tutorial/index.rst` are indexed as their top-level type.
2020-01-13 11:08:11 +00:00
Brad King
ed54d87789 Configure CMake itself with policies through CMake 3.15
In particular, set `CMP0091` to `NEW` to enable the MSVC runtime library
abstraction so it can be set via `CMAKE_MSVC_RUNTIME_LIBRARY` in the
cache.
2019-08-23 10:55:58 -04:00
Brad King
ecdf38aa36 CMakeVersion: Move computation logic to main script 2019-07-29 11:25:43 -04:00
Craig Scott
0518e675ea CMake.qch: Don't include the version in the file name
Fixes: #19374
2019-07-17 21:35:12 +10:00
Brad King
1069a3f02b Configure CMake itself with policies through CMake 3.14
In particular, set `CMP0082` to `NEW` to interleave install commands
in the top-level directory with subdirectory installations.
2019-05-08 13:18:30 -04:00
Brad King
748d024551 Merge topic 'fetchcontent-reduce-boilerplate'
a94355c7b7 FetchContent: Add new command FetchContent_MakeAvailable()
611d5274de Sphinx: Add limited support for nested variables in docs
1a07e1b47d FetchContent: Trivial doc corrections

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2830
2019-01-30 08:13:42 -05:00
Craig Scott
611d5274de Sphinx: Add limited support for nested variables in docs
This is needed to allow example code to contain content like
`${some_${foo}_bar}`.
2019-01-26 16:49:15 +11:00
Lucy Phipps
b9e6d04558 Reduce size of PNG images
Use FileOptimizer 13.50.2431 (x86) and ZopfliPNG 1.0.2.

Update expected file hashes in tests.
2019-01-25 09:14:51 -05:00
Robert Maynard
db89590f36 Help: CMakeTemplateStyle uses colors that better contrast. 2019-01-09 15:53:26 -05:00
Brad King
29ec12fb4f Merge topic 'cmake-through-3.12'
95b4b9137a Declare support for CMake versions through 3.12 for own build

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2496
2018-10-19 09:58:27 -04:00
Joachim Wuttke (o)
fc7ee1ca45 Help: Override pygments CMakeLexer to support <..> and [..]
* The code snippets in the docs consist of CMake code mixed
  with syntax definition punctuation like < > [ ] ... Therefore
  a pure CMake lexer is inadequate. Here it is replaced by a
  CMake syntax definition parser.
* Fixed syntax definition snippets in FindPkgConfig.cmake to
  make best use of syntax highlighting. This source file is the
  hardest to support because it contains comparison operators
  <= = >=, which need special attention to avoid confusion
  with the placeholder indicators <...>.
* Fixed syntax in execute_process.rst (there were unbalanced
  brackets).
* Disabled syntax highlighting for long string examples in
  cmake-language.7.rst.
* No highlighting of removed syntax in CMP0049
* To inspect the outcome of this patch, see e.g. the pages
  * manual/cmake-buildsystem.7.html
  * module/ExternalProject.html
  * module/FindPkgConfig.html
  which are particularly rich in complex code snippets.
2018-10-19 07:25:34 +11:00
Brad King
95b4b9137a Declare support for CMake versions through 3.12 for own build
CMake 3.12 introduced a `...<max>` syntax in the version given to
`cmake_minimum_required` to automatically set policies to NEW up
to that version.  Use it to avoid listing policies explicitly.

The syntax is compatible with older versions of CMake such that they use
the extended version string for the `CMAKE_MINIMUM_REQUIRED_VERSION`
variable (which we don't use) but otherwise ignore it.
2018-10-17 14:29:16 -04:00
T.J. Corona
66f59bd7da cmake-gui: Update icons 2018-08-16 11:56:08 -04:00
Kyle Edwards
2a2829cc75 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.
2018-06-21 11:00:25 -04:00
Orivej Desh
276e369813 Utilities/Sphinx: Add option to build and install Info manual
Add option `SPHINX_INFO` to enable the Sphinx 'texinfo' builder and use
the `makeinfo` tool to convert it to a `.info` file.
2018-06-12 10:25:37 -04:00
luz.paz
be28106880 Fix misc. typos
Found via `codespell` and `grep`
2018-06-04 10:32:49 -04:00
Brad King
d165fd1727 Merge topic 'doc-code-block-highlight'
8114b00b02 Utilities/Sphinx: Do not highlight unspecified code blocks as python

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2047
2018-05-08 08:28:19 -04:00
Brad King
72814e46da Utilities/Sphinx: Make HTML links in parsed-literal blocks more obvious
Hyperlink text color does not stand out when used inside a literal block
because such blocks typically get syntax highlighting.  Update our CSS
style to make the links more distinct.

Suggested-by: Kyle Edwards <kyle.edwards@kitware.com>
2018-05-07 10:10:37 -04:00
Brad King
8114b00b02 Utilities/Sphinx: Do not highlight unspecified code blocks as python 2018-05-04 14:57:36 -04:00
Brad King
8acf46caf1 Utilities/Sphinx: Add role and directive for 'envvar' in CMake domain
This enables cross-reference syntax for CMake environment variables:

    :envvar:`SOMEVAR`

and definition of CMake environment variables via a directive:

    .. envvar:: SOMEVAR

It also adds environment variables defined by the directive and by
`Help/envvar/SOMEVAR.rst` documents to the index.

This `envvar` role and directive is defined in our `cmake` domain
and overrides the equivalent `envvar` role and directive provided
by Sphinx in its default domain.  This is okay because we build
CMake documents in the `cmakd` domain.

This follows up the work from commit v3.10.0-rc1~43^2 (Help: Document
CMake's environment variables, 2017-09-01) that originally added
`envvar` documentation.
2018-04-19 09:02:44 -04:00
Brad King
7e532abc78 Utilities/Sphinx: Fix QtHelp generator identifiers
Add missinge entry in `create_identifiers.py` helper.
2018-04-19 08:48:28 -04:00
Brad King
fb0c3c564c Require CMake 3.1 to build CMake itself
This simplifies some policy settings and use of third-party
libraries with imported targets.
2017-08-10 15:08:02 -04:00
Björn Esser
2a68ff7fd7 Utilities/Sphinx: Restore compatibility with Sphinx pre-1.2
Since commit v3.8.0-rc2~28^2~2 (Utilities/Sphinx: Port cmake extension
to Sphinx 1.4, 2017-02-09) we use the `sphinx.version_info` tuple.
However, it was added in Sphinx v1.2 so the check breaks compatibility
with older versions.  Revise our check to assume Sphinx pre-1.2 if the
version tuple does not exist.
2017-08-02 11:25:21 -04:00