Commit Graph

71218 Commits

Author SHA1 Message Date
Cristian Le
2e88a3efc2 GNUInstallDirs: Fix regression on -DCMAKE_INSTALL_<dir>=<default> in /usr
Fix commit 9789f7d05e (GNUInstallDirs: Add internal helper to compute
specific defaults, 2025-03-28, v4.1.0-rc1~384^2~3) to avoid updating
explicitly-specified cache entries on the first run.  Do not reset the
default value until at least the second run, during which we have
`_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX` already defined.

Fixes: #27211
2025-09-10 16:03:43 -04:00
Brad King
9523d66df2 Merge topic 'iar-asm' into release-4.1
87d95b2222 ASM: Restore CMAKE_ASM_COMPILER_ARCHITECTURE_ID persistence

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11160
2025-09-09 09:45:32 -04:00
Brad King
e7fd2b3251 Merge branch 'release-4.0' into release-4.1 2025-09-08 15:57:08 -04:00
Brad King
edd51d646c CMake 4.0.4 v4.0.4 2025-09-08 14:51:44 -04:00
Brad King
87d95b2222 ASM: Restore CMAKE_ASM_COMPILER_ARCHITECTURE_ID persistence
Refactoring in commit 019f0f8b32 (ARCHITECTURE_ID: Save persistently
even if empty, 2025-03-13, v4.1.0-rc1~499^2~1) accidentally dropped
part of the variable name in `CMakeASMCompiler.cmake`.

Reported-by: Felipe Torrezan <felipe.torrezan@iar.com>
2025-09-08 10:38:30 -04:00
Brad King
0747545129 Merge topic 'FindPython-ABI-handling' into release-4.1
c504b1c638 FindPython: Ensure correct handling of Python_FIND_ABI variable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11145
2025-09-05 09:04:52 -04:00
Marc Chevrier
c504b1c638 FindPython: Ensure correct handling of Python_FIND_ABI variable
Fixes: #27192
2025-09-04 15:06:57 +02:00
Brad King
a4dd4f3dad Merge topic 'ninja-custom-command-comment-syntax' into release-4.1
1bf48e34f4 Ninja: escape special characters in custom command comments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !11136
2025-09-03 10:20:15 -04:00
Brad King
08b9257473 Merge topic 'project-version-fix' into release-4.1
aa16b8eb9a project: Revert changes to VERSION handling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11131
2025-09-03 10:17:12 -04:00
Brad King
154bab609c Merge branch 'release-4.0' into release-4.1 2025-09-03 10:14:14 -04:00
Brad King
cd7cd67fd5 Merge topic 'curl-opt-proxytype' into release-4.1
c8143074cf cmCTestCurl: Avoid using undocumented type for CURLOPT_PROXYTYPE values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11134
2025-09-03 10:13:30 -04:00
Brad King
a51ae8b7f9 Merge branch 'release-3.31' into release-4.0 2025-09-03 10:12:42 -04:00
Brad King
2bc0c335ce Merge topic 'curl-opt-proxytype' into release-4.0
c8143074cf cmCTestCurl: Avoid using undocumented type for CURLOPT_PROXYTYPE values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11134
2025-09-03 10:12:21 -04:00
Brad King
2ea11c1a6e Merge topic 'curl-opt-proxytype' into release-3.31
c8143074cf cmCTestCurl: Avoid using undocumented type for CURLOPT_PROXYTYPE values

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11134
2025-09-03 10:11:43 -04:00
Ben Boeckel
1bf48e34f4 Ninja: escape special characters in custom command comments
Considerations of Ninja's control sequences was not considered in
30fb5b1b22 (Ninja: add COMMENT to build statement descriptions,
2024-05-01) via !9484. Escape both newlines and dollar signs.

Fixes: #27181
2025-09-02 15:33:20 -04:00
Brad King
c8143074cf cmCTestCurl: Avoid using undocumented type for CURLOPT_PROXYTYPE values
Since upstream curl commit `1a12663d06` (CURLOPT: bump `CURLPROXY_*`
enums to `long`, drop casts, 2025-07-28), the `CURLPROXY_*` constants
are integer literals instead of `enum curl_proxytype`.  It turns out
that `curl_easy_setopt` has always expected a `long` anyway, and that
`curl_proxytype` is not documented for public use.

Fixes: #27178
2025-09-02 11:41:10 -04:00
Brad King
cc6dc6ba85 Merge topic 'cmPropertySentinel-definition' into release-4.1
319c427d2f cmPropertySentinel: update definition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11129
2025-09-02 09:48:02 -04:00
Brad King
ef8c5bbaf3 Merge topic 'var-check-before-usage' into release-4.1
d614e8fb3f cmLocalGenerator: check variables before usage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11127
2025-09-02 09:42:40 -04:00
Vito Gamberini
aa16b8eb9a project: Revert changes to VERSION handling
In c4d12d7d we changed how the project command handles various variables
and made the behavior consistent across all variables controlled by
the project command. The conditions under which project() modifies the
various VERSION variables are non-intuitive, but can be observed as
side-effects.

Because this behavior is observable, it requires a policy to be changed.
This commit reverts to the previous behavior until a policy is added
and adds a test for that behavior.

Fixes: #27142
2025-09-02 00:35:24 -04:00
Marc Chevrier
319c427d2f cmPropertySentinel: update definition
Reported by https://pvs-studio.com/en/blog/posts/cpp/1277/ (N8)

Issue: #27159
2025-09-01 09:39:30 +02:00
Marc Chevrier
d614e8fb3f cmLocalGenerator: check variables before usage
Reported by https://pvs-studio.com/en/blog/posts/cpp/1277/ (N2)

Issue: 27159
2025-08-29 18:47:28 +02:00
Brad King
ba8c4a15f1 CMake 4.1.1 v4.1.1 2025-08-27 12:33:28 -04:00
Brad King
e0cd3b7e7d Merge topic 'cmList-swap-fix' into release-4.1
071e8678de cmList: fix swap function definition

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !11101
2025-08-27 10:53:22 -04:00
Brad King
cf9cdde33d Merge topic 'vs7-generator-utility-target-typo' into release-4.1
93a83bcc00 cmGlobalVisualStudio7Generator: fix initialization typo

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11100
2025-08-27 10:48:13 -04:00
Brad King
7c169d5abb Merge branch 'release-4.0' into release-4.1 2025-08-27 10:42:09 -04:00
Brad King
18b3dd1e91 Merge topic 'ninja-many-subdirs' into release-4.1
6de40e7a4d Ninja: Fix regression with `.bat` wrapper around `ninja`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Acked-by: Josef Angstenberger <code@jtxa.de>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !11111
2025-08-27 10:40:10 -04:00
Brad King
e81741a63e Merge topic 'ninja-many-subdirs' into release-4.0
6de40e7a4d Ninja: Fix regression with `.bat` wrapper around `ninja`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11111
2025-08-27 10:38:44 -04:00
Brad King
6de40e7a4d Ninja: Fix regression with .bat wrapper around ninja
Revise the change from commit 5a36d0c9e7 (Ninja: Fix regression with a
large number of subdirectories, 2025-03-04, v4.0.0-rc3~2^2) to use a
command-line length limit small enough for `.bat` files.

Fixes: #27153
2025-08-25 11:31:23 -04:00
Marc Chevrier
071e8678de cmList: fix swap function definition
swap function should be in the same namespace as the cmList class.

Reported by https://pvs-studio.com/en/blog/posts/cpp/1277/ (N1)

Issue: #27159
2025-08-21 17:19:52 +02:00
Ben Boeckel
93a83bcc00 cmGlobalVisualStudio7Generator: fix initialization typo
Typo introduced in b82a74d918 (generators: use GetSupportDirectory() in
more places, 2025-05-21) via !10812. Pointed out in a PVS-Studio blog
post.

See: https://pvs-studio.com/en/blog/posts/cpp/1277/ (N3)
2025-08-20 22:45:13 -04:00
Brad King
d296bf6b70 Merge branch 'release-4.0' into release-4.1 2025-08-20 10:02:23 -04:00
Brad King
0ef525208c Merge topic 'ctest-T-test-timeout' into release-4.1
9dc3edbba8 ctest: Restore default test timeout for command-line `-T Test` step
8745e6308e ctest: Restore default of no time limit for command-line `-T Test` step

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11094
2025-08-20 10:01:00 -04:00
Brad King
d0b490aaf0 Merge topic 'ctest-T-test-timeout' into release-4.0
9dc3edbba8 ctest: Restore default test timeout for command-line `-T Test` step
8745e6308e ctest: Restore default of no time limit for command-line `-T Test` step

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11094
2025-08-20 09:58:46 -04:00
Brad King
9dc3edbba8 ctest: Restore default test timeout for command-line -T Test step
In commit 774fcbe49c (CTest: Base command line mode on top of scripting
commands, 2024-10-05, v4.0.0-rc1~653^2) the implementation of this step
was converted to use `ctest_test` internally.  That command has its own
default test timeout of 600s if the ctest "TimeOut" configuration value
is not set.  If "TimeOut" is not set then default it to our previous
command-line mode default test timeout.

Fixes: #27139
2025-08-18 14:30:56 -04:00
Brad King
8745e6308e ctest: Restore default of no time limit for command-line -T Test step
Refactoring in commit 83845184db (cmCTest: Move timing functions from
cmCTestScriptHandler to cmCTest, 2024-10-23, v4.0.0-rc1~576^2) enabled a
time limit even if the undocumented `CTEST_TIME_LIMIT` script variable
is not set.
2025-08-18 14:10:15 -04:00
Brad King
8c9dd38e7f Merge branch 'release-4.0' into release-4.1 2025-08-15 08:28:35 -04:00
Brad King
fc41d4e3f6 Merge topic 'clang_cuda_support_cuda_13' into release-4.1
67c102ef64 Clang/CUDA: Support CUDA Toolkit 13 new include layout

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11079
2025-08-15 08:27:46 -04:00
Brad King
7af0e010ba Merge branch 'release-3.31' into release-4.0 2025-08-15 08:26:59 -04:00
Brad King
75679c169d Merge topic 'clang_cuda_support_cuda_13' into release-4.0
67c102ef64 Clang/CUDA: Support CUDA Toolkit 13 new include layout

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11079
2025-08-15 08:26:32 -04:00
Brad King
bb97311b4a Merge topic 'clang_cuda_support_cuda_13' into release-3.31
67c102ef64 Clang/CUDA: Support CUDA Toolkit 13 new include layout

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11079
2025-08-15 08:25:35 -04:00
Robert Maynard
67c102ef64 Clang/CUDA: Support CUDA Toolkit 13 new include layout
This ensures that clang knows about the two includes that are required for CUDA 13.
2025-08-14 09:55:53 -04:00
Brad King
4445478ef7 Merge topic 'pkgc-import-system-fix' into release-4.1
d5f6cf5ba8 PkgC: Only remove system paths which are exact matches
93f77d8183 PkgC: Allow system paths during IMPORT, POPULATE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11078
2025-08-14 09:22:47 -04:00
Brad King
8fbddbc777 Merge topic 'genex-strip-nested' into release-4.1
8227028e49 string(GENEX_STRIP): Fix regression on nested generator expressions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11077
2025-08-14 09:20:08 -04:00
Brad King
14665de371 Merge topic 'stdio-terminal' into release-4.1
914803bf31 Makefile: Fix regression that prints unnecessary VT100 escape sequences
a0a9e48f85 StdIo: Fix Terminal abstraction to avoid unnecessary VT100 escape sequences

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11080
2025-08-14 09:18:13 -04:00
Martin Duffy
8227028e49 string(GENEX_STRIP): Fix regression on nested generator expressions
Since commit 13c7bb5b0c (cmGeneratorExpression: Update strip function to
collect parsed expressions, 2025-04-08), the logic to strip generator
expressions from a string made incorrect assumptions about the contents of
generator expressions, leading certain cases to be stripped incorrectly.

Clean up the logic and fix broken behavior, and add test coverage with
`string(GENEX_STRIP)`.

Fixes: #27133
2025-08-13 15:52:16 -04:00
Brad King
914803bf31 Makefile: Fix regression that prints unnecessary VT100 escape sequences
Since commit 509c424472 (StdIo: Replace uses of KWSys Terminal with
StdIo::Print, 2025-05-08, v4.1.0-rc1~151^2~2) we print unnecessary VT100
escape sequences to establish normal text even when not intending to
print color.  In combination with `CLICOLOR_FORCE=1`, this breaks
detection of implicit link information from compiler driver output.

Fixes: #27137
2025-08-13 15:30:25 -04:00
Brad King
a0a9e48f85 StdIo: Fix Terminal abstraction to avoid unnecessary VT100 escape sequences
Fix commit 329d755dbd (StdIo: Add a Terminal abstraction to print color
text, 2025-05-06, v4.1.0-rc1~151^2~3) to avoid printing a VT100 escape
sequence for normal text if we did not print any sequence initially.
We already use this approach for Windows Console text attributes.

Issue: #26924
2025-08-13 15:30:24 -04:00
Vito Gamberini
d5f6cf5ba8 PkgC: Only remove system paths which are exact matches 2025-08-13 12:59:00 -04:00
Vito Gamberini
93f77d8183 PkgC: Allow system paths during IMPORT, POPULATE
Fixes: #27138
2025-08-13 11:57:09 -04:00
Brad King
2a2c2e0b26 CMake 4.1.0 v4.1.0 2025-08-05 10:55:57 -04:00