Commit Graph

36115 Commits

Author SHA1 Message Date
Brad King 52fc175d66 Merge topic 'string-swap-noexcept'
873b8244f0 String: Make swap method noexcept

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9754
2024-08-20 11:52:00 -04:00
Brad King be881e89a8 Merge topic 'optimize-stream-shift-operators'
5b259985bf Refactor: Optimize some `std::ostream::operator<<()` calls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9717
2024-08-20 11:51:10 -04:00
Brad King 89d7ed5497 Merge topic 'fix-dependencies-searching'
4d4e008e69 file(GET_RUNTIME_DEPENDENCIES): Fix resolution of repeated ELF dependencies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9704
2024-08-20 11:38:27 -04:00
Brad King 4522a01192 Merge topic 'cpack-nsis-reserved-component-names'
b1f956529a CPack/NSIS: Fix matching of reserved component names

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9757
2024-08-20 11:17:59 -04:00
Kitware Robot 68f3f3141f CMake Nightly Date Stamp 2024-08-20 00:01:20 -04:00
Rose 873b8244f0 String: Make swap method noexcept
There is no reason why it should not be `noexcept`.
`std::swap` cannot have any exceptions or handle any.
2024-08-19 15:10:34 -04:00
Rose abc8410ac7 cmInstallScriptHandler: Reserve and emplace vector entries 2024-08-19 15:10:19 -04:00
K. R. Walker b1f956529a CPack/NSIS: Fix matching of reserved component names
"Console" unexpectedly matches the reserved name regex.  This revealed
that `cmCPackNSISGenerator::CreateComponentDescription()` needs to use
the name returned by `GetSanitizedDirOrFileName()` for the component
file glob.

Fix the change from commit a1af593291 (CPack: Support arbitrary
component name when packaging, 2024-05-01, v3.30.0-rc1~151^2~1) to
address these issues and add related checks to the `CPackNSISGenerator`
test case.

Issue: #23612
2024-08-19 14:25:31 -04:00
Alex Turbov 5b259985bf Refactor: Optimize some std::ostream::operator<<() calls 2024-08-19 19:42:31 +04:00
Brad King 8fae37d99f Merge topic 'improve-cmJSONHelpers'
17de44e99b cmJSONHelpers.h: Add some empty lines to split code blocks
0b334e5bfb cmJSONHelpers.h: Add generic predicate checking helper
503a73b183 cmJSONHelpers.h: Use `map::emplace()` instead of `operator[]`
e7dcd51a61 cmJSONHelpers.h: Remove useless `cmStrCat()` call
5096ea7a92 cmJSONHelpers.h: Optimize of adding `Member`s to a vector
f4a2070731 cmJSONHelpers.h: Remove redundant `;`
23be530275 cmJSONHelpers.h: Move variable declaation close to first usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Martin Duffy <martin.duffy@kitware.com>
Merge-request: !9731
2024-08-19 10:35:18 -04:00
Brad King 72f2ef297b Merge topic 'help-options'
b5b36f95f9 Help: Add clarifying text for some help options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9706
2024-08-19 10:31:32 -04:00
Brad King c1fc04cfe5 Merge topic 'filesystem-class-check-inheritance'
2216843fd5 cm_cxx_filesystem: Improve detection of std::filesystem support on GCC

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9735
2024-08-19 10:29:11 -04:00
Brad King 12a4feced4 Merge topic 'refactor-messanger'
fc36ac6b22 Refactor: Eliminate redundant `operator<<` calls
4fbeeb97aa Refactor: `… << "\n" << std::flush;` → `… << std::endl;`
3855131c53 Refactor: Eliminate sequential calls to `cmSystemTools::Stdout`
efd3f2356a cmMessenger.cxx: Replace `printMessagePreamble` → `getMessageTypeStr`
0b180e0368 cmMessenger.cxx: Move helper functions to anonymous namespace

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9727
2024-08-19 10:23:36 -04:00
Brad King e43b0ce82b Merge topic 'ninja-filter'
d3baf456c2 cm_cxx_features: Ignore ninja warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9736
2024-08-19 10:19:31 -04:00
Aliaksandr Averchanka 4d4e008e69 file(GET_RUNTIME_DEPENDENCIES): Fix resolution of repeated ELF dependencies
When a library file name is encountered multiple times, reuse the result
from the first time.  This more closely matches the behavior of the
dynamic loader on Linux.

Fixes: #24621
2024-08-19 08:57:04 +03:00
Kitware Robot 43fd48a210 CMake Nightly Date Stamp 2024-08-19 00:02:34 -04:00
Kitware Robot 34146501ff CMake Nightly Date Stamp 2024-08-18 00:01:25 -04:00
Craig Scott dfa4ff89ef Merge topic 'deprecate-CMakeFindFrameworks'
dd87640a22 CMakeFindFrameworks: Deprecate the module subject to policy CMP0173

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9742
2024-08-17 18:35:58 -04:00
Kitware Robot d5b23f5575 CMake Nightly Date Stamp 2024-08-17 00:01:28 -04:00
Kitware Robot 1debc1f2bc CMake Nightly Date Stamp 2024-08-16 00:01:12 -04:00
Craig Scott dd87640a22 CMakeFindFrameworks: Deprecate the module subject to policy CMP0173
Fixes: #20446
2024-08-16 11:10:27 +10:00
Alex Turbov 17de44e99b cmJSONHelpers.h: Add some empty lines to split code blocks 2024-08-15 22:01:34 +04:00
Alex Turbov 0b334e5bfb cmJSONHelpers.h: Add generic predicate checking helper
And use it in the `cmCMakePresetsGraphReadJSON.cxx` to check
presets schema version in the declarative way.

Co-authored-by: Martin Duffy <martin.duffy@kitware.com>
2024-08-15 22:01:34 +04:00
Michael Pratt 2216843fd5 cm_cxx_filesystem: Improve detection of std::filesystem support on GCC
The check added by commit 40af103402 (cmCMakePath: do not use
std::filesystem::path with RH gcc-toolset-10, 2023-12-02, v3.28.0~5^2)
fails unnecessarily in some cases due to not inheriting
`std::string_view` publicly.

Inheritance into a class is private by default, and this std class has
public members that would be access restricted when used to create
public objects in the current scope.

On some versions of GCC, depending on standards options, this causes
either template instantiation errors, or "inaccessible base" or "not
declared" errors.

Fix by setting the inheritance to public.  This does not affect the
intention of the previous fix because the check still fails when using
gcc-toolset-10's standard library with clang.

Issue: #25458, #25453
2024-08-15 11:31:01 -04:00
Brad King d060b05217 Merge topic 'macos-curl-user-agent'
1a74f95656 file(DOWNLOAD): Fix User-Agent to use run-time curl version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9726
2024-08-15 09:37:00 -04:00
Brad King 3265458a79 Merge topic 'macos-curl-user-agent' into release-3.30
1a74f95656 file(DOWNLOAD): Fix User-Agent to use run-time curl version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9726
2024-08-15 09:36:58 -04:00
Brad King 0460e71e1f Merge topic 'curl-http2'
7486f468fb curl: Avoid using HTTP/2 with curl 8.7.x due to bug in error codes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9728
2024-08-15 09:35:37 -04:00
Martin Duffy b5b36f95f9 Help: Add clarifying text for some help options
Fixes: #26193
2024-08-15 09:12:26 -04:00
Kitware Robot 3e072b018a CMake Nightly Date Stamp 2024-08-15 00:01:17 -04:00
Michael Pratt d3baf456c2 cm_cxx_features: Ignore ninja warnings
Future changes to ninja may make harmless warnings more likely.
Filter them out from compiler feature checks.
2024-08-14 17:27:32 -04:00
Matthew Woehlke 3d52d70b84 export: Add initial CPS support
Add initial support for exporting (install only, for now) Common Package
Specification (https://cps-org.github.io/cps/) format package
descriptions. This has some limitations, such as not supporting
generator expressions (as these cannot be portably exported), and only
partially supporting transitive dependencies, but should be usable for
at least some simple cases. (Actually, $<LINK_ONLY> is theoretically
supportable, but is not yet implemented.)

This still needs tests; these will be added in the next commit. Other
potential improvements include support for language-specific compile
definitions and inferring some package properties from project
properties. Additionally, there is no module support yet; this is partly
pending on having a tool agnostic format for providing the necessary
information.
2024-08-14 15:25:27 -04:00
Alex Turbov fc36ac6b22 Refactor: Eliminate redundant operator<< calls 2024-08-14 19:56:54 +04:00
Kitware Robot b2b3c5825f CMake Nightly Date Stamp 2024-08-14 00:01:26 -04:00
Alex Turbov 503a73b183 cmJSONHelpers.h: Use map::emplace() instead of operator[] 2024-08-14 01:37:38 +04:00
Alex Turbov e7dcd51a61 cmJSONHelpers.h: Remove useless cmStrCat() call 2024-08-14 01:37:38 +04:00
Alex Turbov 5096ea7a92 cmJSONHelpers.h: Optimize of adding Members to a vector 2024-08-14 01:37:38 +04:00
Alex Turbov f4a2070731 cmJSONHelpers.h: Remove redundant ; 2024-08-14 01:16:40 +04:00
Alex Turbov 23be530275 cmJSONHelpers.h: Move variable declaation close to first usage 2024-08-14 01:16:34 +04:00
Brad King 7486f468fb curl: Avoid using HTTP/2 with curl 8.7.x due to bug in error codes
curl 8.7.x has a bug in HTTP/2 error codes introduced by
commit `0dc036225` (HTTP/2: write response directly, 2024-01-31,
`curl-8_7_0~230`) and fixed by commit `5c59f9142` (http2 + ngtcp2:
pass CURLcode errors from callbacks, 2024-04-18, `curl-8_8_0~181`).

Fixes: #26200
2024-08-13 15:07:53 -04:00
Brad King 1a74f95656 file(DOWNLOAD): Fix User-Agent to use run-time curl version
If CMake is linked to a system-provided curl shared library, the version
at run-time may not match the `LIBCURL_VERSION` at build time.  Look up
the run-time curl version to populate the User-Agent string.

This is particularly important since commit d3cbee99e3 (macOS: Prefer
building with system-provided curl, 2024-05-09, v3.30.0-rc1~130^2~1)
switched to building our official binaries on macOS against the system
provided curl shared library.

Fixes: #26209
2024-08-13 14:14:10 -04:00
Alex Turbov 4fbeeb97aa Refactor: … << "\n" << std::flush;… << std::endl; 2024-08-13 22:14:05 +04:00
Alex Turbov 3855131c53 Refactor: Eliminate sequential calls to cmSystemTools::Stdout 2024-08-13 22:14:05 +04:00
Alex Turbov efd3f2356a cmMessenger.cxx: Replace printMessagePreamblegetMessageTypeStr
According to the compiler explorer the `getMessageTypeStr()` much shorter
and faster (as table lookup).
2024-08-13 22:14:04 +04:00
Alex Turbov 0b180e0368 cmMessenger.cxx: Move helper functions to anonymous namespace 2024-08-13 22:14:04 +04:00
Brad King 88e90fcd20 Merge topic 'cuda_unity'
b90ae10dda Add support for unity builds with CUDA sources
c99ff40b21 Unity: refactor unity extension logic to single function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9655
2024-08-13 11:01:13 -04:00
Kitware Robot 8733dcd115 CMake Nightly Date Stamp 2024-08-13 00:01:28 -04:00
Kitware Robot 407c0f449d CMake Nightly Date Stamp 2024-08-11 00:01:58 -04:00
Kitware Robot 0dc5cd674e CMake Nightly Date Stamp 2024-08-10 00:01:15 -04:00
Kitware Robot 5e734dd25a CMake Nightly Date Stamp 2024-08-09 00:01:18 -04:00
Kitware Robot c0cd10cd98 CMake Nightly Date Stamp 2024-08-08 00:01:17 -04:00