Commit Graph

1889 Commits

Author SHA1 Message Date
Joe Blaauboer
e1ec052d53 clang-tidy module: add check for string concatenation
Co-Authored-by: Kyle Edwards <kyle.edwards@kitware.com>
2022-11-28 13:34:04 -05:00
Kyle Edwards
c6368a23fe clang-tidy module: look for sizeof string literal in cmStrLen() check 2022-11-18 09:37:58 -05:00
Sean Orner
aa0c99c55c clang-tidy module: add test for #pragma once check 2022-11-17 13:55:52 -05:00
Igor-Mikhail-Valentin Glebov
c9af6f2ff6 clang-tidy module: add #pragma once check
Co-Authored-by: Kyle Edwards <kyle.edwards@kitware.com>
2022-11-17 13:55:52 -05:00
Kyle Edwards
68a4d97da7 clang-tidy module: allow header files in test cases 2022-11-17 13:55:52 -05:00
Sean Orner
75ab77ee19 clang-tidy module: add test for ostringstream check 2022-11-14 13:51:59 -05:00
Joe Blaauboer
04638e7358 clang-tidy module: add check for ostringstream 2022-11-14 13:51:59 -05:00
Brad King
efefd80eda Merge topic 'expat-c-no-extensions'
019af62294 expat: Activate POSIX APIs even without compiler extensions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7899
2022-11-11 08:11:15 -05:00
Raul Tambre
019af62294 expat: Activate POSIX APIs even without compiler extensions
Compile with the preprocessor definitions necessary for the `arc4random`
family so it's available even when compiler extensions are not enabled.
Similar things are done in cmbzip2, cmcurl, cmlibarchive, cmliblizma and
cmlibuv.

This issue surfaced on a nightly bot after glibc 2.36 added arc4random
functions. cmlibarchive defines the necessary macro, but also relies on
`HAVE_ARC4RANDOM_BUF`.  cmlibarchive's check with the necessary macro
defined was skipped due to cmexpat running the same check before, but
without the macros, and it being cached.

This extends commit c7c3e39e4f (Utilities: Activate POSIX APIs even
without compiler extensions, 2022-06-02, v3.24.0-rc1~34^2) to cover our
build of expat too.

Issue: #20454
2022-11-10 16:04:38 -05:00
Brad King
e1a45974d6 Merge topic 'curl-windows-no-tls1.3'
c0a4536cec curl: Disable schannel TLS 1.3 support on Windows 11

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7894
2022-11-10 09:58:34 -05:00
Brad King
c0a4536cec curl: Disable schannel TLS 1.3 support on Windows 11
Curl 7.85.0 introduced support for TLS 1.3 support with schannel.
We've observed connection failures in some cases, so disable the
support pending further investigation.

Fixes: #24147
2022-11-09 17:05:39 -05:00
Brad King
6834ffd21b Merge topic 'doc-guide-link-style'
977c38c339 Help: Render guide links as normal text instead of monospace

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7886
2022-11-09 09:29:53 -05:00
Alex Turbov
977c38c339 Help: Render guide links as normal text instead of monospace
The guide document names are phrases, not code-like man-page names.
Add CSS selectors for `:guide:` links and revert unnecessary properties.
2022-11-08 09:53:20 -05:00
Brad King
814ded48b0 Merge topic 'clang-tidy-module-use-bespoke-enum-class-check'
5f97772fcb clang-tidy: disable bespoke enum class check
eab8e38961 clang-tidy module: add check for boolean parameters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7883
2022-11-08 09:21:18 -05:00
Brad King
dab81ced1b Merge topic 'sphinx-linkcheck'
a89c76a773 Build: Add `SPHINX_LINKCHECK` build option
137b00cda1 Build: Do not redirect `sphinx-build` output if CMake running in verbose mode
d954fb8a60 Build: Deduplicate `add_custom_command()` calls for Sphinx targets
2af8724485 Merge branch 'backport-sphinx-linkcheck' into sphinx-linkcheck
435b0c573c Help: Fix some redirects reported with sphinx linkcheck
ac5295a9de Help: Fix broken external links found by sphinx linkcheck

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7876
2022-11-08 09:02:31 -05:00
Sean Orner
eab8e38961 clang-tidy module: add check for boolean parameters
Co-Authored-by: Kyle Edwards <kyle.edwards@kitware.com>
2022-11-07 13:15:02 -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
Alex Turbov
137b00cda1 Build: Do not redirect sphinx-build output if CMake running in verbose mode
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.
2022-11-07 10:09:53 -05:00
Alex Turbov
d954fb8a60 Build: Deduplicate add_custom_command() calls for Sphinx targets 2022-11-07 10:09:46 -05:00
Igor-Mikhail-Valentin Glebov
ffa970559c clang-tidy module: add tests for cmsys::fstream check
Co-Authored-by: Kyle Edwards <kyle.edwards@kitware.com>
2022-11-04 11:33:23 -04:00
Joe Blaauboer
d520853682 clang-tidy module: add check for cmsys::fstream
Co-Authored-by: Kyle Edwards <kyle.edwards@kitware.com>
Co-Authored-by: Igor-Mikhail-Valentin Glebov <iglebov@albany.edu>
2022-11-04 11:33:23 -04:00
Kyle Edwards
01d8308406 Tests: remove stderr from clang-tidy module tests
The stderr has the potential to count warnings from system header
files, which are very platform-specific and not reliable, and they
are simply a count of all the warnings that were emitted on stdout,
which we already have. Remove stderr and only look at stdout.
2022-11-04 11:02:47 -04:00
Brad King
07dbb523d2 Merge topic 'update-nghttp2'
e44b551e8d nghttp2: Update build within CMake to account for 1.50.0
8b73605408 Merge branch 'upstream-nghttp2' into update-nghttp2
7ce2a682a3 nghttp2 2022-09-21 (87fef4ab)
66c9536775 nghttp2: Update script to get nghttp2 1.50.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7856
2022-11-01 08:57:36 -04:00
Brad King
923de4b88c Merge topic 'update-curl'
25e9f31878 curl: Set build options the way we need for CMake
9ffe6b0969 Merge branch 'upstream-curl' into update-curl
ec122fff08 curl 2022-10-26 (cd95ee9f)
fa9bbb8627 curl: Update script to get curl 7.86.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7851
2022-11-01 08:54:58 -04:00
Brad King
25e9f31878 curl: Set build options the way we need for CMake 2022-10-31 16:12:43 -04:00
Brad King
9ffe6b0969 Merge branch 'upstream-curl' into update-curl
* upstream-curl:
  curl 2022-10-26 (cd95ee9f)
2022-10-31 16:11:41 -04:00
Brad King
fa9bbb8627 curl: Update script to get curl 7.86.0 2022-10-31 16:10:39 -04:00
Brad King
e44b551e8d nghttp2: Update build within CMake to account for 1.50.0 2022-10-31 14:11:34 -04:00
Brad King
8b73605408 Merge branch 'upstream-nghttp2' into update-nghttp2
# By nghttp2 upstream
* upstream-nghttp2:
  nghttp2 2022-09-21 (87fef4ab)
2022-10-31 14:09:53 -04:00
Brad King
66c9536775 nghttp2: Update script to get nghttp2 1.50.0 2022-10-31 14:08:55 -04:00
Henry Schreiner
d78bfa1ecc Utilities/Sphinx: support cmakedomain running in parallel
Fixes: #24076

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2022-10-24 18:03:11 -04:00
Brad King
7c71f9b1e8 Merge topic 'filesystem-path-c++03-abi'
ee9805ccd1 cm/filesystem: Fix crash with pre-C++11 std::string GNU ABI in C++17

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7813
2022-10-21 10:06:22 -04:00
Brad King
d44340115f Merge topic 'filesystem-path-c++03-abi' into release-3.25
ee9805ccd1 cm/filesystem: Fix crash with pre-C++11 std::string GNU ABI in C++17

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7813
2022-10-21 10:06:20 -04:00
Brad King
47063db58d Merge branch 'filesystem-path-c++03-abi' into release-3.24
Merge-request: !7813
2022-10-20 19:03:52 -04:00
Brad King
ee9805ccd1 cm/filesystem: Fix crash with pre-C++11 std::string GNU ABI in C++17
The `remove_filename` and `replace_extension` methods compute an offset
between the whole path in a `std::string` and a part of a path in a
`std::string_view`.  This is done by subtracting their `.data()`
pointers.  However, C++17 adds a non-const `.data()` through which
modification of the string is allowed.  This means the copy-on-write
implementation used by the pre-C++11 std::string GNU ABI must reallocate
if the string has been copied.  Our subtraction then computes an offset
between two different allocations, which is undefined behavior.

The workaround in commit b3ca4f9ad1 (cm/filesystem: Work around crash
when compiled for CYGWIN/MSYS runtime, 2021-04-22, v3.21.0-rc1~271^2~2)
avoided the problem by calling the non-const `.data()` to reallocate
before constructing the `string_view`.  Instead, explicitly call the
const `.data()` method on the string, which does not reallocate.

Fixes: #22090, #23328
2022-10-20 18:31:50 -04:00
Sean Orner
43481a77f9 clang-tidy module: add test for cmStrLen() check 2022-10-19 13:52:58 -04:00
Kyle Edwards
43a88b56af clang-tidy module: add check for cmStrLen()
Co-Authored-by: Joe Blaauboer <jblaauboer67@gmail.com>
2022-10-19 13:51:11 -04:00
Kyle Edwards
0a2093d0c5 clang-tidy module: add test framework 2022-10-14 11:09:38 -04:00
Kyle Edwards
153f39f4a5 Merge topic 'clang-tidy-plugin-stub'
d6f5e67f7b ci: add clang-tidy plugin to clang-tidy job
6c6912123e clang-tidy: Add option to load CMake's clang-tidy module
0ad3941f73 clang-tidy module: Add stub module

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !7768
2022-10-14 11:01:58 -04:00
Kyle Edwards
0ad3941f73 clang-tidy module: Add stub module
Issue: #23912
2022-10-12 13:23:45 -04:00
Brad King
5f998bbcb3 Configure CMake itself with policies through CMake 3.24 2022-10-12 12:43:27 -04:00
Brad King
294b6db533 Utilities/Sphinx: Avoid deprecated docutils error handling helpers
The `SafeString` and `ErrorString` classes are deprecated and will be
removed in Docutils 0.21 or later.  They help avoid encoding errors
during exception handling in Python <= 2.7, but these days we always
use Python 3 to build the documentation, at least during development,
when error cases are most likely to occur.

Fixes: #24039
2022-10-11 10:01:12 -04:00
Brad King
a48d668d18 Merge topic 'update-libuv'
23de1675fd libuv: Update CMake-internal buildsystem for 1.44.2
ff82df301c Merge branch 'upstream-libuv' into update-libuv
a23da15596 libuv 2022-07-12 (0c1fa696)
cfe8fd6421 libuv: Update script to get libuv 1.44.2

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7709
2022-09-27 09:52:55 -04:00
Brad King
23de1675fd libuv: Update CMake-internal buildsystem for 1.44.2 2022-09-27 09:50:38 -04:00
Brad King
ff82df301c Merge branch 'upstream-libuv' into update-libuv
* upstream-libuv:
  libuv 2022-07-12 (0c1fa696)
2022-09-27 09:50:16 -04:00
Brad King
cfe8fd6421 libuv: Update script to get libuv 1.44.2 2022-09-27 09:49:15 -04:00
Alex Turbov
df8ad72ffa Build: Use imported target kwiml::kwiml instead of variables 2022-09-22 10:21:39 -04:00
Alex Turbov
2be5a7de4e Build: Use imported target ZLIB::ZLIB instead of variables 2022-09-22 10:20:30 -04:00
Alex Turbov
a509602699 Build: Modernize some foreach calls to use IN LISTS/IN ITEMS 2022-09-22 09:24:46 -04:00
FeRD (Frank Dana)
ff2e7ceb66 QtHelp: Update Sphinx issue URLs in comments
The QtHelp Sphinx generation code contains two links to Sphinx issues
that used old, dead BitBucket URLs. Those issues were migrated to
GitHub, so the dead links can be replaced with working ones.
2022-09-04 22:59:00 +10:00