Commit Graph

36037 Commits

Author SHA1 Message Date
Kitware Robot
9b421a5fa3 CMake Nightly Date Stamp 2024-08-28 00:01:56 -04:00
Brad King
72607d3402 Merge topic 'cps-export'
b2dc1bd149 CMake: Suppress IBM XL optimization warning
1a846c8849 Tests: Add tests for install(PACKAGE_INFO)
3d52d70b84 export: Add initial CPS support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9693
2024-08-27 09:43:51 -04:00
Kitware Robot
cc02ac8314 CMake Nightly Date Stamp 2024-08-27 00:01:23 -04:00
Brad King
cd4210eb6d Merge topic 'cmake_path-GET-STEM'
b0be1bd9ca cmake_path: Fix 'GET "foo/.." STEM' result

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9765
2024-08-26 10:00:15 -04:00
FeRD (Frank Dana)
b0be1bd9ca cmake_path: Fix 'GET "foo/.." STEM' result
`cmake_path(GET "foo/.." STEM out)` is supposed to set `out` to `".."`,
the entire `cmake_path(GET "foo/.." FILENAME)` result.

However, the `GetNarrowStem()` logic in `cmCMakePath` was lacking
the `.` and `..` special-casing logic present in other methods.
As a result, it would erroneously trim the second `.` off of a stem
of `..` and return only `.`.

This caused the result of `cmake_path(GET "foo/.." STEM)` to be `"."`.

Making the standard empty-or-.-or-.. checks and bailing out early
fixes the result of `cmCMakePaths{".."}.GetNarrowStem()`.

Fixes: #26235
2024-08-26 09:55:57 -04:00
Brad King
d625e832ed Merge topic 'cmake-parse-arguments-one-arg-empty-string'
ceeea4e511 cmake_parse_arguments: Set variable if empty string given after keyword
2f5cc6afa1 cmParseArgumentsCommand: Use cmStrCat() for string concatenation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9748
2024-08-26 09:53:16 -04:00
Brad King
fe63f15383 Merge topic 'fileapi-config-dir'
1df94443fe fileapi: Add support for user-wide queries
a991a5019b Tests: Isolate test suite from user-wide configuration
320b81847d Tests: Remove unused cvs anonymous access credentials

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9744
2024-08-26 09:48:40 -04:00
Kitware Robot
70470acb84 CMake Nightly Date Stamp 2024-08-26 00:03:54 -04:00
Kitware Robot
cfdc318c93 CMake Nightly Date Stamp 2024-08-25 00:01:11 -04:00
Kitware Robot
86f2af6173 CMake Nightly Date Stamp 2024-08-24 00:01:55 -04:00
Kitware Robot
5022113bbe CMake Nightly Date Stamp 2024-08-23 00:01:22 -04:00
Craig Scott
ceeea4e511 cmake_parse_arguments: Set variable if empty string given after keyword
If a single-value keyword is followed by an empty string, the
command unsets the variable for that keyword instead of setting
it to the empty string. This is inconsistent and unexpected. Add
policy CMP0174 which ensures the variable for a single-value
keyword is always set when any value is given, not just for a
non-empty value.

The new CMP0174 policy only affects the PARSE_ARGV form of
cmake_parse_arguments. The older form silently drops all empty
string arguments before processing the argument list.

Fixes: #25972
2024-08-23 09:42:13 +10:00
Craig Scott
2f5cc6afa1 cmParseArgumentsCommand: Use cmStrCat() for string concatenation 2024-08-23 09:42:12 +10:00
Martin Duffy
1df94443fe fileapi: Add support for user-wide queries
Fixes: #19168
2024-08-22 10:24:23 -04:00
Brad King
3d61720112 Merge topic 'autogen-predefs-emscripten'
8d1803d463 AutoGen: Run batch scripts using cmd.exe on windows platforms explicitly
9ab270f47d cmSystemTools: Add GetComspec method to get cmd on Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9733
2024-08-22 09:03:05 -04:00
Kitware Robot
497b43b997 CMake Nightly Date Stamp 2024-08-22 00:01:17 -04:00
Brad King
d81a2e4f5e Merge topic 'cpack-pkg-c_str'
1393b31635 cmCPackPKGGenerator: Remove redundant call to c_str

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9759
2024-08-21 08:54:14 -04:00
Alexey Edelev
8d1803d463 AutoGen: Run batch scripts using cmd.exe on windows platforms explicitly
The CreateProcessW function requires to use the cmd.exe when
attempting to execute batch scripts. AutoMoc RunProcess relies on
CreateProcessW in it's internals. Currently the cmd.exe run happens
implicitly for batch files(perhaps by luck), but this is not
documented anywhere.

This replaces the .bat files in the AutoGen related command lines with
explicit 'cmd.exe /c' call. Also 'cmd.exe /c' has own limitation
related to the arguments. The very first argument shouldn't be quoted
otherwise this lead to the parsing issues. So for the .bat files that
contain spaces in their paths use short name conversion.

Fixes #26208
2024-08-21 11:05:19 +02:00
Alexey Edelev
9ab270f47d cmSystemTools: Add GetComspec method to get cmd on Windows
The function attempts to read the path to cmd executable from the
COMSPEC environment variable. Falls back to cmd.exe if the respective
environment variable is not set or path doesn't exist.
2024-08-21 11:05:16 +02:00
Kitware Robot
f1bf0d6a49 CMake Nightly Date Stamp 2024-08-21 00:01:38 -04:00
Rose
1393b31635 cmCPackPKGGenerator: Remove redundant call to c_str
The call is unnecessary since commit 438809d3ba (cmCPackGenerator: Add
option to FindTemplate to use alternate builtin path, 2024-03-06,
v3.30.0-rc1~353^2~4).
2024-08-20 11:58:28 -04:00
Brad King
041a482079 Merge topic 'vector-reserve-and-emplace'
abc8410ac7 cmInstallScriptHandler: Reserve and emplace vector entries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9753
2024-08-20 11:53:49 -04:00
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