Commit Graph

1983 Commits

Author SHA1 Message Date
Brad King
094c5a089d Utilities/Sphinx: Restore html search index link anchors
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
2023-07-13 12:16:39 -04:00
Brad King
8801ce34c1 Merge topic 'sphinx-docutils-warning' into release-3.27
0c14b6085a Utilities/Sphinx: Fix warning from docutils 0.18.1+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8578
2023-06-23 10:46:29 -04:00
Henry Schreiner
0c14b6085a Utilities/Sphinx: Fix warning from docutils 0.18.1+
Also might fix 0.18.0 exactly, which apparently forgot to add the
backward compat shim.
2023-06-22 10:48:50 -04:00
Matthew Woehlke
f546ebfecc Utilities/Sphinx: Fix parallel documentation builds
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>
2023-06-22 10:02:43 -04:00
Matthew Woehlke
528cdc7551 Utilities/Sphinx: Fix some flake8 gripes
Reorder some imports to better conform to what flake8 wants.
2023-06-13 11:39:48 -04:00
Matthew Woehlke
4bd1beded4 Utilities/Sphinx: Don't ignore flake8 E402
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.
2023-06-13 11:25:14 -04:00
Brad King
1f39a3cd1a Utilities/Sphinx: Restore explicit check for Sphinx 2.x or later
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.
2023-06-12 17:37:13 -04:00
Brad King
5de805bea2 Utilities/Sphinx: Fix flake8 E124 diagnostic in cmake.py 2023-06-12 17:34:25 -04:00
Brad King
7838ae4fd8 Merge topic 'ctest-timeout-signal'
54c5654f7d ctest: Optionally terminate tests with a custom signal on timeout
e38c05688e CTest/cmProcess: Adopt field tracking reason for the process timeout
25c1468314 cmCTestTestHandler: Remove outdated comment
41e8507ab7 IWYU: Add mapping for bits/chrono.h to chrono

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8472
2023-06-05 06:33:36 -04:00
Brad King
54c5654f7d ctest: Optionally terminate tests with a custom signal on timeout
CTest normally terminates test processes on timeout using `SIGKILL`.
Offer tests a chance to exit gracefully, on platforms supporting POSIX
signals, by setting `TIMEOUT_SIGNAL_{NAME,GRACE_PERIOD}` properties.

Fixes: #17288
2023-06-02 06:51:13 -04:00
Brad King
859de07aa3 Merge topic 'update-curl'
2de38e0b45 Utilities: Update hard-coded try_compile results for curl 8.1.2
a6c9b53273 Merge branch 'upstream-curl' into update-curl
80cb6a5121 curl 2023-05-30 (7ab9d437)
7f1abf62e1 curl: Update script to get curl 8.1.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8519
2023-06-01 09:44:21 -04:00
Brad King
41e8507ab7 IWYU: Add mapping for bits/chrono.h to chrono 2023-05-31 09:43:01 -04:00
Glen Chung
a9a592f96e cmake: Add debugger
- Depends on cppdap and jsoncpp.
- Add --debugger argument to enable the Debugger.
- Add --debugger-pipe argument for DAP traffics over named pipes.
- Support breakpoints by filenames and line numbers.
- Support exception breakpoints.
- Call stack shows filenames and line numbers.
- Show Cache Variables.
- Show the state of currently defined targets,
  tests and directories with their properties.
- Add cmakeVersion to DAP initialize response.
- Include unit tests.

Co-authored-by: Ben McMorran <bemcmorr@microsoft.com>
2023-05-30 09:46:12 -04:00
Brad King
2de38e0b45 Utilities: Update hard-coded try_compile results for curl 8.1.2 2023-05-30 09:40:38 -04:00
Brad King
a6c9b53273 Merge branch 'upstream-curl' into update-curl
* upstream-curl:
  curl 2023-05-30 (7ab9d437)
2023-05-30 09:39:43 -04:00
Brad King
7f1abf62e1 curl: Update script to get curl 8.1.2 2023-05-30 09:36:39 -04:00
Brad King
5ec69eb58c cppdap: Build as part of CMake or use external installation
Add `cm3p/` headers to use the selected copy of the library.

Co-authored-by: Glen Chung <kuchung@microsoft.com>
2023-05-26 09:36:14 -04:00
Glen Chung
3381e6bd5c Merge branch 'upstream-cppdap' into import-cppdap
* upstream-cppdap:
  cppdap 2023-05-26 (03cc1867)
2023-05-26 09:36:03 -04:00
Brad King
bd58bc7817 cppdap: Add script to import version as of 2023-05-25
Co-authored-by: Glen Chung <kuchung@microsoft.com>
2023-05-26 09:33:34 -04:00
Brad King
172045b53b jsoncpp: Add cm3p/ headers for json/json.h and json/forwards.h
Add `cm3p/` headers to use the selected copy of the library.
2023-05-23 11:08:42 -04:00
Brad King
fad150d314 clang-tidy module: Update to build against LLVM/Clang 16 2023-05-22 17:16:12 -04:00
Brad King
ce3ec02bb2 clang-tidy module: Drop unused variable 2023-05-22 17:16:12 -04:00
Brad King
d531b9e7d1 zstd: Suppress clang-analyzer warnings 2023-05-22 16:51:16 -04:00
Brad King
bba02b8b4b zlib: Suppress clang-analyzer warnings 2023-05-22 16:51:16 -04:00
Brad King
395f0cb69c nghttp2: Suppress clang-analyzer warnings 2023-05-22 16:51:16 -04:00
Brad King
b18eca763c libuv: Suppress clang-analyzer warnings 2023-05-22 16:51:16 -04:00
Brad King
5ec464a76f librhash: Suppress clang-analyzer warnings 2023-05-22 16:51:15 -04:00
Brad King
e24c403816 liblzma: Suppress clang-analyzer warnings 2023-05-22 16:51:15 -04:00
Brad King
48297cf770 libarchive: Suppress clang-analyzer warnings 2023-05-22 16:51:15 -04:00
Brad King
91e4d27765 bzip2: Suppress clang-analyzer warnings 2023-05-22 16:51:15 -04:00
Brad King
e090f348d3 curl: Avoid redundant getenv calls in curltest
Also avoid using the result without checking for NULL.
2023-05-22 16:51:15 -04:00
Brad King
f1438379c2 Merge topic 'test-bootstrap'
80181da866 Tests: Add option to control timeout of BootstrapTest
21df34b255 Tests: Modernize name of option to control existence of BootstrapTest

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8491
2023-05-19 08:46:23 -04:00
Brad King
21df34b255 Tests: Modernize name of option to control existence of BootstrapTest 2023-05-18 13:41:31 -04:00
Ben Boeckel
e8efcbec8c iwyu: ignore std::remove_reference requirements
This removes some includes from some existing files.
2023-05-15 22:26:36 -04:00
Brad King
ba5ced1be6 libarchive: Set build options the way we need for CMake 2023-04-25 10:35:27 -04:00
Brad King
1e2bce305f Merge branch 'upstream-LibArchive' into update-libarchive
* upstream-LibArchive:
  LibArchive 2022-12-09 (ba80276c)
2023-04-25 10:28:08 -04:00
Brad King
744a42c0ee libarchive: Update script to get 3.6.2 2023-04-25 10:20:59 -04:00
Craig Scott
e245b4df75 Merge topic 'automoc-macro-names'
c5c3aff1f5 Autogen: Add INTERFACE_AUTOMOC_MACRO_NAMES target property
69cf9700e6 Autogen: Defer setup until Generate step
7cecb6353e cmGeneratorTarget: Factor out EvaluatedTargetProperty infrastructure
2daba01ddf cmGeneratorTarget: Avoid incidental include-what-you-use warning
850b4d990c IWYU: Add mapping for 'std::remove_reference<Defer &>::type'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8391
2023-04-10 18:06:06 -04:00
Craig Scott
0de00b8b69 Sphinx: Modernize UTF-8 encoding handling when updating CMake.qhp 2023-04-07 18:14:18 +10:00
Craig Scott
f0d6010cb5 Sphinx: Specify encoding when opening files for title extraction
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
2023-04-07 18:11:05 +10:00
Brad King
850b4d990c IWYU: Add mapping for 'std::remove_reference<Defer &>::type'
IWYU sometimes thinks that `cmCMakeLanguageCommand.cxx` mentions this
type and suggests including `<type_traits>` for it.  The type is only
used internally by standard library functions.  Work around the problem
by mapping the offending name to a file that we always include.
2023-04-05 16:12:15 -04:00
Kyle Edwards
550f6b40bd clang-tidy module: copy .gitignore from top level
Since 8b094845, .gitignore entries have been pinned to the top-level
.gitignore file. Copy these entries into a .gitignore for the
clang-tidy module.
2023-03-29 16:32:40 -04:00
Brad King
eca41c0243 curl: Restore build within CMake after update to 8.0.1
Restore changes from commit 2be5a7de4e (Build: Use imported target
`ZLIB::ZLIB` instead of variables, 2022-08-21, v3.25.0-rc1~97^2~10)
that were undone by the update to curl 8.0.1.  The code was moved.
2023-03-20 16:42:25 -04:00
Brad King
e3dc4df9b9 Merge branch 'upstream-curl' into update-curl
* upstream-curl:
  curl 2023-03-20 (b16d1fa8)
2023-03-20 16:40:49 -04:00
Brad King
4e6c3cd93b curl: Update script to get curl 8.0.1 2023-03-20 15:56:55 -04:00
Matthew Woehlke
adbc8c982d Utilities/Sphinx: Fix flake8 gripes in cmake.py
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.)
2023-03-15 10:53:10 -04:00
Matthew Woehlke
9fab1ad504 Utilities/Sphinx: Use f-strings in cmake.py
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.
2023-03-15 10:53:10 -04:00
Matthew Woehlke
cef51925a4 Utilities/Sphinx: Require Sphinx 2.x or later
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.
2023-03-15 10:53:10 -04:00
Matthew Woehlke
302f5171d8 Utilities/Sphinx: Add 'cref' role
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>
2023-03-14 15:20:47 -04:00
Matthew Woehlke
bc77ddb90c Utilities/Sphinx: Factor out part of CMakeXRefRole
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.
2023-03-14 15:13:38 -04:00