Commit Graph

67778 Commits

Author SHA1 Message Date
Brad King
39fd396421 LINK_LIBRARIES_STRATEGY: Rename strategies to clarify expectations
Since commit 7abd3137b7 (Linking: Optionally reorder direct dependencies
from LINK_LIBRARIES, 2024-09-19, v3.31.0-rc1~53^2) the strategy name
`PRESERVE_ORDER` has led users to expect that it strictly preserves
order.  While the part of the link line generation logic controlled by
`LINK_LIBRARIES_STRATEGY` does preserve order, it is not the last step.
Toolchain-specific de-duplication can cause the order to change on the
actual link line generated in the build system.

Rename the strategies:

* `PRESERVE_ORDER` => `REORDER_MINIMALLY`
* `REORDER`        => `REORDER_FREELY`

The new names make it clear that reordering is always possible, just to
varying degrees.  Update the `LINK_LIBRARIES_STRATEGY` documentation to
clarify that the strategies do not directly control the final link line.

Fixes: #26400
Issue: #26271
2024-10-25 10:23:37 -04:00
Brad King
bdec4219ad Tests/RunCMake/CTestTimeout: Improve reliability when running on busy hosts
The `PropertyOverridesVar` case occasionally reaches the `TIMEOUT`
property's timeout, which is not what the test expects.  Extend the
property's timeout to make it less likely to be reached.
2024-10-25 09:25:03 -04:00
Dylan Snelgrove
0f515c2d26 libuv: win/spawn: add option to use parent process error mode
Backport changes from libuv v2 commit `8ad246557a` (win,process: allow
users to configure child error mode, 2024-10-17) to add the
`UV_PROCESS_WINDOWS_USE_PARENT_ERROR_MODE` option.

Also use `UV_PROCESS_WINDOWS_USE_PARENT_ERROR_MODE` to keep
the behavior the same as before the option was added,
all child processes would be spawned the the parent's
error mode.

Issue: #20115
2024-10-25 08:51:45 -04:00
Dylan Snelgrove
728f40d4bf libuv: win/spawn: allow exception through to OS
Backport changes from libuv v2 commit `da343e6237` (win: allow fatal
errors to trigger WER, 2023-01-17).

Issue: #20115
2024-10-25 08:51:45 -04:00
KWSys Upstream
acade348a7 KWSys 2024-10-25 (7cff32e1)
Code extracted from:

    https://gitlab.kitware.com/utils/kwsys.git

at commit 7cff32e10e2bfe763415bc550816e8a9608e5954 (master).

Upstream Shortlog
-----------------

Brad King (1):
      6e847d08 SystemInformation: Add missing EOF check when reading /proc/cpuinfo
2024-10-25 08:46:27 -04:00
Brad King
60385d2f52 Merge branch 'upstream-KWSys' into ci-fedora-41
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2024-10-25 (7cff32e1)
2024-10-25 08:46:27 -04:00
Brad King
6fdb15672d Tests: Update FindBoost.TestPython for Python 3.13 and 3.14
Follow up the python 3.13 and 3.14 support from:

* commit be958c8f35 (FindPython: Add support for Python 3.14, 2024-10-17)
* commit dfab044c44 (FindPython: add support for Python 3.13, 2023-08-14)

with an update for the FindBoost test.
2024-10-25 08:43:05 -04:00
Brad King
570f54c8f7 clang-tidy: ignore warnings new in version 19
These warnings can be fixed in the future.  Ignore them for now.
Also drop some suppressions we no longer need.
2024-10-25 08:43:04 -04:00
Brad King
7605228f5e codespell: Fix typos 2024-10-25 08:43:04 -04:00
Seth R Johnson
fb0b3d1585 FindCUDAToolkit: Remove debug message
This was left accidentally by commit 587c0443cc (FindCUDAToolkit:
Support CUDA version extraction from version.json, 2023-05-02,
v3.26.4~3^2).
2024-10-25 08:32:00 -04:00
Brad King
65c1147e6c Merge topic 'ctest-timing'
83845184db cmCTest: Move timing functions from cmCTestScriptHandler to cmCTest

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9936
2024-10-25 08:28:43 -04:00
Brad King
719376b0a6 Merge topic 'no-stringly-typed-variables'
5497eba1a0 CTestUpdate: Prefer concrete variables over map entries
8cac63814c CTestSubmit: Prefer concrete variables over map entries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9935
2024-10-25 08:27:43 -04:00
Brad King
5d48124044 Merge topic 'ctest-handler-refactoring-pre'
f5a314cc35 cmCTestGenericHandler: Add cmCTest* argument to Initialize function
20b35ef622 cmCTestBuildCommand: Make use of ProcessAdditionalValues
b3c01f70b5 ctest: Print documentation without creating a cmCTest instance
66460dc4d7 cmCTest: Cleanup ReadCustomConfigurationFileTree function
812f8cce5a cmCTest: Cleanup PopulateCustomVectors calls
e279ba06dc cmCTest: Inline InitializeTesting at its call site

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9934
2024-10-25 08:26:56 -04:00
Brad King
e83535f5a3 Merge topic 'improve-package-search'
6f3dc1161a find_package: Also sort Framework matches
e90f60f864 find_package: Don't glob certain macOS paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9942
2024-10-25 08:25:34 -04:00
Brad King
0ba8bdb5c2 Merge topic 'doc-BUILD_TESTING'
9510820d58 Help: Document CTest module BUILD_TESTING variable
6e6e688b80 CTest: Improve formatting of documentation cmake code blocks

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9927
2024-10-25 08:23:25 -04:00
Brad King
87d26eaf17 Merge branch 'release-3.31' 2024-10-25 08:21:33 -04:00
Brad King
1380d0ddfa Merge topic 'windows-kernel-mode-driver'
54bbd00448 WindowsKernelModeDriver: Switch to appending to variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9941
2024-10-25 08:21:33 -04:00
Brad King
ebd038613e Merge topic 'windows-kernel-mode-driver' into release-3.31
54bbd00448 WindowsKernelModeDriver: Switch to appending to variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9941
2024-10-25 08:21:32 -04:00
Brad King
e39d1e64f6 Merge branch 'release-3.31' 2024-10-25 08:19:56 -04:00
Brad King
e5be5c7706 Merge topic 'lfortran-link-info'
34067963cc LFortran: Improve detection of implicit link information for lfortran 0.40+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9939
2024-10-25 08:19:56 -04:00
Brad King
0a37acc607 Merge topic 'lfortran-link-info' into release-3.31
34067963cc LFortran: Improve detection of implicit link information for lfortran 0.40+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9939
2024-10-25 08:19:54 -04:00
Brad King
6e88f339f9 Merge branch 'release-3.31' 2024-10-25 08:18:29 -04:00
Brad King
aebbbb2840 Merge topic 'linker-configuration-enhancements'
0619c064ff Linker configuration: enhance usability

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9937
2024-10-25 08:18:29 -04:00
Brad King
4dd738b53c Merge topic 'linker-configuration-enhancements' into release-3.31
0619c064ff Linker configuration: enhance usability

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9937
2024-10-25 08:18:27 -04:00
Brad King
1d59b05d58 Merge branch 'release-3.31' 2024-10-25 08:13:04 -04:00
Brad King
4cf0de3c3a Merge topic 'Help-CMAKE_LINK_DEPENDS_USE_LINKER'
686698a7b4 Help: Update note relative the GNU binutils linkers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9938
2024-10-25 08:13:04 -04:00
Brad King
8e99e70297 Merge topic 'Help-CMAKE_LINK_DEPENDS_USE_LINKER' into release-3.31
686698a7b4 Help: Update note relative the GNU binutils linkers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9938
2024-10-25 08:13:02 -04:00
Brad King
19287b0175 Merge topic 'normalize-input-paths'
773b75e4ed cmake: Explicitly look up on-disk case of input paths on Windows
e9bd437a43 Merge branch 'upstream-KWSys' into normalize-input-paths
ede7f2afa6 KWSys 2024-10-24 (e1acde2e)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: scivision <michael@scivision.dev>
Merge-request: !9932
2024-10-25 08:11:10 -04:00
Marc Chevrier
8979e7aaab add_custom_command(DEPFILE): avoid duplicate entries in dependencies
Fixes: #26399
2024-10-25 10:40:12 +02:00
Kitware Robot
d20dc253d7 CMake Nightly Date Stamp 2024-10-25 00:01:30 -04:00
Brad King
773b75e4ed cmake: Explicitly look up on-disk case of input paths on Windows
KWSys's `CollapseFullPath` no longer looks up the actual case on disk.
Add the lookup explicitly where we need it:

* `ToNormalizedPathOnDisk`
* `file(REAL_PATH)`
* `get_filename_component(... ABSOLUTE)`

Fixes: #20214
2024-10-24 16:09:38 -04:00
Brad King
e9bd437a43 Merge branch 'upstream-KWSys' into normalize-input-paths
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2024-10-24 (e1acde2e)
2024-10-24 16:08:43 -04:00
KWSys Upstream
ede7f2afa6 KWSys 2024-10-24 (e1acde2e)
Code extracted from:

    https://gitlab.kitware.com/utils/kwsys.git

at commit e1acde2e48813c276c5777d6adae6bcdc3b03923 (master).

Upstream Shortlog
-----------------

Brad King (2):
      4feb470a SystemTools: Remove GetActualCaseForPath from CollapseFullPath
      741c9c96 SystemTools: Expose GetActualCaseForPathCached publicly
2024-10-24 16:08:42 -04:00
Matthew Woehlke
6f3dc1161a find_package: Also sort Framework matches
Add cmAnyDirectoryListGenerator, which matches any directory but also
sorts matches in the same manner as cmProjectDirectoryListGenerator.
Modify SearchFrameworkPrefix to use this, in combination with a literal
path (cmAppendPathSegmentGenerator), instead of cmFileListGeneratorGlob
(which is removed, as it is no longer used). This improves the
consistency of when sorting is available.

This uses cmDirectoryListGenerator's new ability to match anything, as
mentioned in the previous commit.
2024-10-24 13:42:42 -04:00
Joseph Snyder
54bbd00448 WindowsKernelModeDriver: Switch to appending to variables
When using the WindowsKernelModeDriver, do not add the new paths
if the variable was not previously defined.  Instead, append them
to the existing value.

Add a new GUID for the Experimental mode gate
2024-10-24 13:20:08 -04:00
Matthew Woehlke
e90f60f864 find_package: Don't glob certain macOS paths
Modify cmDirectoryListGenerator to support exact matching as well as
'starts-with' matching. The latter is used to implement '<name>*' search
paths, but cmDirectoryListGenerator is also used for '<name><suffix>'
matching (via cmMacProjectDirectoryListGenerator, mainly for macOS
paths), which resulted in the latter actually matching '<name><suffix>*'
even though that is not documented and unlikely to be useful.

This also adds the ability for cmDirectoryListGenerator to match
anything (by giving an empty list of names), which isn't in use yet, but
which we will use in the future.
2024-10-24 12:59:51 -04:00
Robert Maynard
9510820d58 Help: Document CTest module BUILD_TESTING variable
The `BUILD_TESTING` variable is referenced in `add_test` and
`enable_testing`.  It should be documented as it controls the
behavior tests working when projects use `include(CTest)`.
2024-10-24 11:46:37 -04:00
Brad King
6e6e688b80 CTest: Improve formatting of documentation cmake code blocks 2024-10-24 11:43:31 -04:00
Brad King
34067963cc LFortran: Improve detection of implicit link information for lfortran 0.40+
These versions of LFortran support passing `-v -Wl,-v` to the underlying
compiler so we can extract the full implicit link information.

Issue: #26145
2024-10-24 11:15:12 -04:00
Marc Chevrier
686698a7b4 Help: Update note relative the GNU binutils linkers 2024-10-24 17:02:15 +02:00
Marc Chevrier
0619c064ff Linker configuration: enhance usability
The linker configuration file is now optional: It is loaded only if
variable CMAKE_<LANG>_USE_LINKER_CONFIGURATION is set to TRUE.

The file CMakeAddNewLanguage.txt is updated to take into account the
linker configuration.

Fixes: #26393
2024-10-24 16:37:30 +02:00
Brad King
bd51803761 Merge topic 'misc-refactoring'
788e5c1043 Tests: Add tests for `cmDocumentationFormatter::PrintFormatted()`
8c1a850c19 cmMessenger: Deduplicate `cmSystemTools::Message()` calls
9c118ae9d4 Refactor: `cmCPackGenerator::DisplayVerboseOutput()` unused arg
5fd795f975 MessageType: Add `UNDEFINED` enum item
a6cae9dbc4 cmMessageCommand: Rename+move `CheckingType` → `Message::CheckType`
bb9071e9e7 cmDocumentationFormatter.cxx: Move padding string creation out of loop
f40712fc10 cmTargetLinkLibrariesCommand: Optimize `ostream::operator<<` calls
1ffb746c92 cmGlobalGenerator.cxx: Optimize `ostream::operator<<` calls
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9920
2024-10-24 09:00:32 -04:00
Brad King
f6c75df6a3 Merge branch 'release-3.31' 2024-10-24 08:59:43 -04:00
Brad King
3ef7198e43 Merge topic 'fix-path-search-doc'
630e4a12a3 Help: Fix find_package search order w.r.t. globs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Matthew Woehlke <matthew.woehlke@kitware.com>
Merge-request: !9930
2024-10-24 08:59:43 -04:00
Brad King
81f49865f2 Merge topic 'fix-path-search-doc' into release-3.31
630e4a12a3 Help: Fix find_package search order w.r.t. globs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Acked-by: Matthew Woehlke <matthew.woehlke@kitware.com>
Merge-request: !9930
2024-10-24 08:59:41 -04:00
Brad King
df95171f2b Merge branch 'release-3.31' 2024-10-24 08:58:47 -04:00
Brad King
23a24935f1 Merge topic 'doc-link-libraries-strategy'
1e2b2b7fd2 Help: Clarify LINK_LIBRARIES_STRATEGY follow-up de-duplication

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9933
2024-10-24 08:58:47 -04:00
Brad King
f19cc0c33f Merge topic 'doc-link-libraries-strategy' into release-3.31
1e2b2b7fd2 Help: Clarify LINK_LIBRARIES_STRATEGY follow-up de-duplication

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9933
2024-10-24 08:58:46 -04:00
Kitware Robot
30a6920dcd CMake Nightly Date Stamp 2024-10-24 00:01:27 -04:00
Daniel Pfeifer
83845184db cmCTest: Move timing functions from cmCTestScriptHandler to cmCTest 2024-10-24 00:06:31 +02:00