Commit Graph

36 Commits

Author SHA1 Message Date
Kitware Robot
1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Brad King
3c175b5f2c ci: Tell linkcheck to tolerate redirect to versioned variant 2025-02-23 09:15:47 -05:00
Brad King
21befcd8aa ci: Do not linkcheck web.archive.org URLs
Avoid unnecessary use of Internet Archive resources.
Their URLs are meant to be stable.
2024-12-18 09:10:26 -05:00
Brad King
5fa7f75577 ci: Do not linkcheck www.tasking.com URLs
The server's certificate fails verification.
2024-10-30 05:39:11 -04:00
Brad King
0b2be5c0bf ci: linkcheck_ignore www.intel.com URLs more precisely 2024-10-30 05:38:00 -04:00
Brad King
f60b4c553e Utilities/Sphinx: Tell linkcheck to not treat timeouts as broken
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.
2024-10-26 06:01:09 -04:00
Axel Huebl
b07c637e42 FindOpenMP: Add option to control OpenMP runtime with MSVC
The MSVC compiler's `-openmp` flag accepts `:{experimental,llvm}`
values.  Add an option to specify one.

Closes: #25570
2024-05-01 08:25:14 -04:00
Brad King
cdd741ebf9 Merge branch 'backport-ci-fedora-39' into ci-fedora-39 2023-11-17 11:35:41 -05:00
Brad King
40552722c9 Utilities/Sphinx: Fix python string literal syntax warning
Python 3.12 started warning:

    conf.py:35: SyntaxWarning: invalid escape sequence '\.'

Use a raw string literal instead.
2023-11-17 09:58:21 -05:00
Brad King
d865d5bce1 ci: Do not linkcheck www.intel.com URLs
They fail with a 403 Client Error, perhaps due to our once-per-day
request being classified as scraping.
2023-11-06 12:53:35 -05:00
Brad King
3f684b123d Utilities/Sphinx: Allow linkcheck redirect for our get-involved page
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.
2023-09-28 09:36:23 -04:00
Brad King
14506f49a2 Utilities/Sphinx: Configure linkcheck allowed permanent redirects
Some permanent redirects are part of the structure of their site
to make URLs look nicer.  Allow them.
2023-02-17 08:45:01 -05:00
Alex Turbov
a89c76a773 Build: Add SPHINX_LINKCHECK build option
Run `sphinx-build` to check external links and report broken one.
2022-11-07 10:10:23 -05:00
Brad King
cca73b54ae Utilities/Sphinx: Add undocumented option to build docs for cmake.org 2022-04-05 16:09:54 -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
Brad King
cdbd1ae64b Utilities/Sphinx: Avoid converting -- to an en-dash 2021-02-18 10:55:09 -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
Craig Scott
0518e675ea CMake.qch: Don't include the version in the file name
Fixes: #19374
2019-07-17 21:35:12 +10: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
8114b00b02 Utilities/Sphinx: Do not highlight unspecified code blocks as python 2018-05-04 14:57:36 -04:00
Matthew Woehlke
62b85c9406 Utilities/Sphinx: Use brighter colors for html theme
Set Sphinx `html_theme_options` to give the generated documentation a
brighter and softer look than the default colors.
2017-03-28 13:38:42 -04:00
Brad King
d33de80c8a Help/dev: Exclude this directory from user-facing documentation
Teach Sphinx and our own install rules to skip a `Help/dev` directory.
This will give us a place to put developer-only documentation that
should not be included in the user-facing documentation.  Add a
placeholder README.
2017-03-01 16:05:55 -05:00
Brad King
86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Brad King
4c8c442d7c Help: Fix broken cross-references reported by 'nitpicky' option
Enable the Sphinx 'nitpicky' option and fix the resulting warnings about
dangling references.
2014-11-07 11:41:21 -05:00
Brad King
5088e0a048 Utilities/Sphinx: Fix html_favicon configuration
The value must be either a full path or relative to the configuration
directory, not relative to the 'static' directory.  Use a full path.
This avoids a warning:

 WARNING: favicon file 'cmake-favicon.ico' does not exist

It worked before because all 'static' directory content is copied to the
'_static' directory of html output anyway.
2014-11-07 09:50:50 -05:00
Brad King
e0790c90c0 Merge topic 'sphinx-python3'
69069cfb Utilities/Sphinx: Port documentation generation to python3 (#14886)
2014-04-18 09:08:28 -04:00
Uwe L. Korn
69069cfb1a Utilities/Sphinx: Port documentation generation to python3 (#14886) 2014-04-18 08:42:34 -04:00
Stephen Kelly
111bb67c14 Help: Use a more-appropriate qthelp namespace and file name.
Use the namespace org.cmake instead of org.sphinx.cmake. Add the
version to the output file name.
2014-04-10 17:30:57 +02:00
Brad King
3bade75b02 Help: Parse Copyright.txt instead of using current year
Configure our Sphinx conf.py with a copyright line extracted from
Copyright.txt instead of using the year in which the documentation is
built.  This will future-proof the reported copyright year range when
building documentation for old versions.
2013-11-13 09:18:57 -05:00
Brad King
a023a26cad Help: Configure html favicon 2013-11-05 08:59:02 -05:00
Brad King
fb332197bf Help: Configure html page navigation bars
Add a small CMake logo to the left side of the header and footer
navigation bars.  Set the html theme, title, and short title explicitly.
2013-11-05 08:58:56 -05:00
Brad King
edc7cc967d Help: Configure copyright year automatically
Teach our Sphinx conf.py to compute the copyright end year
automatically.  Drop our hard-coded configuration for it.
2013-11-04 14:22:23 -05:00
Brad King
f88332f5b7 Help: Glob manual/*.rst in Sphinx configuration
Add the man page description line as explicit markup at the top of each
Help/manual/*.rst file and scan it from conf.py to automatically
generate the man_pages Sphinx configuration value.  This reduces the
number of places that need to be changed when a new manual is added.
2013-10-30 09:58:25 -04:00
Brad King
80a311ed6a Help: Add cmake-developer.7 manual
Add the manual with just an introduction section.  Leave section headers
for Help and Modules to be filled in later.
2013-10-22 09:50:15 -04:00
Brad King
e7ca48f226 Help: Factor out cmake-generator-expressions manual page
Generator expressions are supported in many places and are a distinct
concept worthy of their own manual page.  The old builtin documentation
was previously represented by preprocessor macros to generate it into
each place that supports them.  Factor out the duplicate content into a
dedicated cmake-generator-expressions manual page and reference it from
each original location.
2013-10-16 09:22:38 -04:00
Brad King
bfe07aa97e Build Help documentation during CMake build using Sphinx
Add a Utilities/Sphinx directory to hold CMake build code to run the
Sphinx (sphinx-doc.org) documentation generation tool.  Create a
CMakeLists.txt file there capable of building either as a subdirectory
of the main CMake build, or as a standalone documentation build.

Add cache options SPHINX_MAN and SPHINX_HTML to select output formats
and SPHINX_EXECUTABLE to specify the sphinx-build executable.  Add
bootstrap options --sphix-man and --sphinx-html to select output formats
and --sphinx-build=<sb> to specify the sphinx-build executable.

Create a "conf.py.in" file to configure_file into "conf.py" to tell
sphinx-build how to build our documents.  Create a "cmake.py" Sphinx
extension module defining:

* The "cmake-module" directive used in Help/module/*.rst files to
  scan .rst markup from the corresponding Modules/*.cmake file.

* A Sphinx domain called "cmake" defining documentation object types
  for CMake Help/<type> directories: command, generator, manual,
  module, policy, prop_*, and variable.  Add a "role" for each type
  to perform cross-references.  Teach the roles to treat "<XYZ>"
  as placeholders instead of explicit targets if not preceded by
  a space.  Add cmake domain directives to define command and
  variable objects explicitly in .rst file content.  This will
  allow modules to define their own commands and variables and
  have them indexed and linkable.

* A Sphinx document transform that converts Help/<type>/*.rst documents
  into cmake domain objects of the corresponding <type> and adds index
  entries for them.  This will automatically index all CMake documentation
  objects and provide cross-reference targets for them with no special
  markup in the .rst files.
2013-10-16 09:22:37 -04:00