Commit Graph

36370 Commits

Author SHA1 Message Date
Brad King 8779b1ad28 Merge branch 'backport-ci-fedora-41' into ci-fedora-41 2024-10-26 06:02:18 -04:00
Brad King 5c7a55edc2 cmStringAlgorithms: Fix core.NonNullParamChecker diagnostic in cmAlphaNum 2024-10-26 06:01:09 -04:00
Brad King 51ed0eba18 KWSys: SystemInformation: Add missing EOF check when reading /proc/cpuinfo
Backport KWSys upstream commit `6e847d08b` (SystemInformation: Add
missing EOF check when reading /proc/cpuinfo, 2024-10-23) to the
CMake 3.31 release branch.
2024-10-26 06:01:09 -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 7605228f5e codespell: Fix typos 2024-10-25 08:43:04 -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 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 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 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
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
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
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
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
Daniel Pfeifer 5497eba1a0 CTestUpdate: Prefer concrete variables over map entries 2024-10-23 23:52:47 +02:00
Daniel Pfeifer f5a314cc35 cmCTestGenericHandler: Add cmCTest* argument to Initialize function 2024-10-23 23:42:14 +02:00
Daniel Pfeifer 8cac63814c CTestSubmit: Prefer concrete variables over map entries 2024-10-23 23:37:30 +02:00
Daniel Pfeifer 20b35ef622 cmCTestBuildCommand: Make use of ProcessAdditionalValues 2024-10-23 23:22:05 +02:00
Daniel Pfeifer b3c01f70b5 ctest: Print documentation without creating a cmCTest instance 2024-10-23 23:22:05 +02:00
Daniel Pfeifer 66460dc4d7 cmCTest: Cleanup ReadCustomConfigurationFileTree function 2024-10-23 23:22:05 +02:00
Daniel Pfeifer 812f8cce5a cmCTest: Cleanup PopulateCustomVectors calls
In `ExecuteTests`, call `PopulateCustomVectors` on the test handler.
in script mode, `cmCTestHandlerCommand::InitialPass` already calls
the function on the handler before processing it.  Hence, calling
the function all handlers in `ReadCustomConfigurationFileTree` is
no longer necessary and can be removed.
2024-10-23 14:49:55 +02:00
Daniel Pfeifer e279ba06dc cmCTest: Inline InitializeTesting at its call site 2024-10-23 14:49:55 +02:00
Brad King 063e98eb4b Merge topic 'normalize-input-paths'
ee83165923 cmake: Explicitly normalize input paths as they exist on disk
9d44a77454 find_*: Explicitly normalize found paths as they exist on disk
967d3ea85c cmake-gui: Explicitly normalize input paths as they exist on disk
074ad98ebc ctest: Explicitly normalize input paths as they exist on disk
1f14238701 cpack: Explicitly normalize input paths as they exist on disk
9fe09ebc53 cmSystemTools: Add GetEnvPathNormalized to get paths from environment
2108f3507f cmSystemTools: Add SplitEnvPathNormalized to split paths from environment
6d57403e14 cmSystemTools: Fix SplitEnvPath to avoid empty paths
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9929
2024-10-23 08:30:35 -04:00
Brad King f4206ef8cd Merge topic 'ninja-escape-object-path'
ad10c31845 Ninja: Fix object path quoting in compilation database

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !9925
2024-10-23 08:28:43 -04:00
Kitware Robot caab45d1f1 CMake Nightly Date Stamp 2024-10-23 00:01:21 -04:00
Brad King ee83165923 cmake: Explicitly normalize input paths as they exist on disk
`CollapseFullPath` has two use cases:

1.  Normalize input paths from command-line arguments and environment
    variables.  On Windows, load their on-disk capitalization.

2.  Simplify paths constructed internally.  These should already have
    the correct capitalization.

Audit all `CollapseFullPath` call sites and code paths leading to them.
Replace those calls that normalize input paths with calls to
`ToNormalizedPathOnDisk` to express that they need the on-disk case.

By making this distinction we will later be able to remove the on-disk
capitalization lookup `CollapseFullPath`, thus eliminating disk accesses
from internal path processing.

Issue: #20214
2024-10-22 13:26:19 -04:00
Brad King 9d44a77454 find_*: Explicitly normalize found paths as they exist on disk 2024-10-22 13:26:19 -04:00
Brad King 967d3ea85c cmake-gui: Explicitly normalize input paths as they exist on disk 2024-10-22 13:26:19 -04:00
Brad King 074ad98ebc ctest: Explicitly normalize input paths as they exist on disk 2024-10-22 13:26:12 -04:00
Brad King 1f14238701 cpack: Explicitly normalize input paths as they exist on disk 2024-10-22 13:24:46 -04:00
Brad King 9fe09ebc53 cmSystemTools: Add GetEnvPathNormalized to get paths from environment 2024-10-22 13:24:40 -04:00
Brad King 2108f3507f cmSystemTools: Add SplitEnvPathNormalized to split paths from environment 2024-10-22 13:23:27 -04:00
Brad King 6d57403e14 cmSystemTools: Fix SplitEnvPath to avoid empty paths 2024-10-22 13:23:27 -04:00
Brad King 2503b43b6c cmSystemTools: Add ToNormalizedPathOnDisk helper
`CollapseFullPath` currently accesses the filesystem on Windows to
convert the path to the (upper/lower) case it has on disk.  Not all call
sites need this, so we'd eventually like to remove the behavior.  Add a
wrapper for call sites to express that they need to match the case of
on-disk paths.

Issue: #20214
2024-10-22 13:23:26 -04:00
Brad King b81c273445 Source: Remove unnecessary calls to CollapseFullPath
Remove call sites whose input is already an absolute path,
or whose result is not used.
2024-10-22 13:23:08 -04:00
Brad King 808ae84483 cmFind*Command: Simplify file validation code paths 2024-10-22 11:21:31 -04:00
Brad King fbd5d4e87f cmFind*Command: Store candidate paths as local variables 2024-10-22 11:21:31 -04:00
Brad King 9fb1caa1b9 cmFindProgramCommand: Remove stray cut-n-paste comment
In commit ef935b17ab (clang-tidy: fix `readability-use-anyofallof`
warnings, 2021-01-22, v3.20.0-rc1~95^2) a comment was copied to a
location where it doesn't make sense.
2024-10-22 11:21:31 -04:00
Brad King d814accf82 Merge topic 'cpack-D-no-sep'
e7371f5a18 cpack: Allow -D flag to be used without separator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9924
2024-10-22 10:31:36 -04:00
Kitware Robot 3c8704c7c0 CMake Nightly Date Stamp 2024-10-22 00:01:17 -04:00
Alex Turbov 8c1a850c19 cmMessenger: Deduplicate cmSystemTools::Message() calls 2024-10-22 01:06:30 +04:00