Commit Graph

1949 Commits

Author SHA1 Message Date
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
Brad King
ec8dff789f Merge topic 'version-hanging-indent'
038f4c12e3 Utilities/Sphinx: Add hanging indent to version notes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8325
2023-03-14 15:07:18 -04:00
Matthew Woehlke
038f4c12e3 Utilities/Sphinx: Add hanging indent to version notes
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.
2023-03-14 14:39:44 -04:00
Brad King
c8679f0571 Utilities/Sphinx: Restore trailing parens on command cross-references
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()`.
2023-03-14 14:33:02 -04:00
Brad King
08d31c227b Merge topic 'smart-wrap-signatures'
39ecaa5da1 Utilities/Sphinx: Improve word wrap of signatures

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8317
2023-03-14 09:39:52 -04:00
Matthew Woehlke
2e37a20f02 Utilities/Sphinx: Allow explicit target for genex
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
2023-03-13 17:04:52 -04:00
Matthew Woehlke
39ecaa5da1 Utilities/Sphinx: Improve word wrap of signatures
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.)
2023-03-13 13:31:38 -04:00
Matthew Woehlke
cc21d0e478 Utilities/Sphinx: Make signatures linkable
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.
2023-03-09 11:32:07 -05:00
Matthew Woehlke
37e015d4a6 Utilities/Sphinx: Refactor Sphinx reference recording
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.
2023-03-08 13:19:50 -05:00
Brad King
3d6075da4d Merge topic 'improve-doc-signatures'
533ebb072b Help: Use signature directive for string command
cd33f461a6 Help: Use signature directive for cmake_language command
74e3c1d313 Utilities/Sphinx: Add a directive to document command signatures
c09b760484 Utilities/Sphinx: Drop commented-out code from cmake domain impl
6e85ad7f8b Help/dev: Add per-directive sections in CMake Documentation Guide

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8243
2023-03-07 08:49:30 -05:00
Matthew Woehlke
74e3c1d313 Utilities/Sphinx: Add a directive to document command signatures
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.
2023-03-03 17:05:02 -05:00
Brad King
c09b760484 Utilities/Sphinx: Drop commented-out code from cmake domain impl
Inspired-by: Alex Turbov <i.zaufi@gmail.com>
2023-02-24 12:25:35 -05:00
Brad King
d7e206fd58 Utilities: Update hard-coded try_compile results for curl 7.88.1 2023-02-21 10:25:01 -05:00
Brad King
ce1550f178 Merge branch 'upstream-curl' into update-curl
* upstream-curl:
  curl 2023-02-20 (046209e5)
2023-02-21 10:04:36 -05:00
Brad King
37cceabc65 curl: Update script to get curl 7.88.1 2023-02-21 09:54:32 -05:00
Brad King
f7be10b26a Merge topic 'ci-linkcheck'
0787148785 gitlab-ci: Report sphinx logs as artifacts of its lint job
14506f49a2 Utilities/Sphinx: Configure linkcheck allowed permanent redirects
3c5b34af9d Help: Replace links with their permanent redirects
1004be159f FindCUDAToolkit: Replace broken links to NVIDIA documentation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8210
2023-02-17 08:54:51 -05:00
Brad King
7eacde32d8 Merge topic 'update-nghttp2'
5872d9bd4d Merge branch 'upstream-nghttp2' into update-nghttp2
7eee97387a nghttp2 2023-02-13 (be049129)
b9221fcc17 nghttp2: Update script to get nghttp2 1.52.0
36d31dc996 Merge branch 'upstream-nghttp2' into update-nghttp2
2355f50277 nghttp2 2022-09-21 (87fef4ab)
1ca53784ca nghttp2: Update import script to fix version header
bfca444b92 nghttp2: Drop unused configuration value from build within CMake

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8217
2023-02-17 08:51:51 -05: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
Brad King
5872d9bd4d Merge branch 'upstream-nghttp2' into update-nghttp2
# By nghttp2 upstream
* upstream-nghttp2:
  nghttp2 2023-02-13 (be049129)
2023-02-16 15:24:14 -05:00
Brad King
b9221fcc17 nghttp2: Update script to get nghttp2 1.52.0 2023-02-16 15:23:56 -05:00
Brad King
36d31dc996 Merge branch 'upstream-nghttp2' into update-nghttp2
# By nghttp2 upstream
* upstream-nghttp2:
  nghttp2 2022-09-21 (87fef4ab)
2023-02-16 15:22:28 -05:00
Brad King
1ca53784ca nghttp2: Update import script to fix version header
In commit 66c9536775 (nghttp2: Update script to get nghttp2 1.50.0,
2022-10-31, v3.26.0-rc1~455^2~2) we forgot to update the `nghttp2ver.h`
replacements to provide the proper `NGHTTP2_VERSION_NUM`.  This causes
our build of curl to think it is using a different version of nghttp2
than we provide.  Fix the version and add a reminder comment.

Issue: #24419
2023-02-16 15:21:38 -05:00
Brad King
bfca444b92 nghttp2: Drop unused configuration value from build within CMake
Since commit 7ce2a682a3 (nghttp2 2022-09-21 (87fef4ab), 2022-09-21,
v3.26.0-rc1~455^2~1^2) we do not need `SIZEOF_INT_P`.
2023-02-16 15:13:52 -05:00
Brad King
81dfe0a330 Merge topic 'curl-macos-tls'
0d312728eb curl: Backport upstream fix for SecureTransport on macOS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8193
2023-02-10 09:58:49 -05:00
Brad King
0d312728eb curl: Backport upstream fix for SecureTransport on macOS
Backport upstream curl commit `16bb32e104d` (sectransp: fix for
incomplete read/writes, 2023-01-05) to fix TLS support on macOS.

Fixes: #24398
2023-02-09 16:54:25 -05:00
Brad King
288e815324 Merge topic 'curl-windows-restore-tls1.3'
8675d8bdb0 curl: Enable schannel TLS 1.3 support on Windows 11

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8184
2023-02-09 10:10:19 -05:00
Brad King
8675d8bdb0 curl: Enable schannel TLS 1.3 support on Windows 11
Revert commit c0a4536cec (curl: Disable schannel TLS 1.3 support on
Windows 11, 2022-11-09, v3.25.0~13^2).  The curl bug it avoided was
fixed by upstream curl commit `4f42150d0` (sendf: change Curl_read_plain
to wrap Curl_recv_plain , 2022-11-14, curl-7_87_0~129), which we have
since recently updating to curl 7.87.0.

Issue: #24147
2023-02-08 14:55:24 -05:00
Brad King
220fa1d92b Configure CMake itself with policies through CMake 3.25 2023-02-01 17:01:38 -05:00
Brad King
6b2c52b25b Merge topic 'ccg-index-type'
91a26ce041 cmComputeComponentGraph: use `size_t` for component indices
65c0a64dc5 cmComputeComponentGraph: use a name for "invalid component"
50abdaab93 IWYU: exclude `__decay_and_strip<int>` as well

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8128
2023-02-01 09:06:07 -05:00
Brad King
1a5bc71c59 Merge topic 'update-curl'
8443dfa946 curl: Work around missing OpenSSL symbol on machine with LCC 1.23
f9f5957884 Merge branch 'upstream-curl' into update-curl
dac458ddbf curl 2022-12-21 (c12fb3dd)
39dcf9469d curl: Update script to get curl 7.87.0
b2fe717a49 file: Avoid using deprecated curl progress callback
1cd38de47f ctest: Drop unnecessary use of deprecated CURLOPT_PUT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8131
2023-01-31 09:13:24 -05:00
Brad King
8443dfa946 curl: Work around missing OpenSSL symbol on machine with LCC 1.23
On a nightly build using LCC 1.23, OpenSSL 2.0.0 is found but does
not seem to have the `X509_STORE_up_ref` symbol used by curl 7.87.
Pending further investigation, disable use of the symbol based on
the compiler version.
2023-01-30 08:22:02 -05:00
Brad King
f9f5957884 Merge branch 'upstream-curl' into update-curl
* upstream-curl:
  curl 2022-12-21 (c12fb3dd)
2023-01-27 15:58:44 -05:00
Brad King
39dcf9469d curl: Update script to get curl 7.87.0 2023-01-27 15:58:19 -05:00
Brad King
b2fe717a49 file: Avoid using deprecated curl progress callback 2023-01-27 15:57:54 -05:00
Ben Boeckel
25f0b4f397 CMake: add an option to run IWYU in verbose mode
This helps to diagnose places where IWYU asks to include headers for
internal stdlib details.
2023-01-27 11:09:07 -05:00