Commit Graph

67693 Commits

Author SHA1 Message Date
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 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
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
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
Matthew Woehlke 630e4a12a3 Help: Fix find_package search order w.r.t. globs
Add documentation to clarify that `find_package` searches paths in the
specified order and stops at the first match.  Clarify documentation of
`CMAKE_FIND_PACKAGE_SORT_*` to match the actual behavior.

Note that no behavior is actually changed, this merely improves the
documentation to reflect actual behavior rather than seeming to imply
something else.

Also, update the test to verify that what we claim in the updated
documentation is what's actually happening.
2024-10-23 12:46:07 -04:00
Brad King 1e2b2b7fd2 Help: Clarify LINK_LIBRARIES_STRATEGY follow-up de-duplication
Extend discussion of the ``PRESERVE_ORDER`` example to prominently
explain how platform-specific behavior can affect generated link lines.

Closes: #26388
2024-10-23 10:09:22 -04:00
Alex Turbov 788e5c1043 Tests: Add tests for cmDocumentationFormatter::PrintFormatted() 2024-10-23 16:33:02 +04: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
Brad King c9e2cbf1cf Merge branch 'release-3.31' 2024-10-23 08:27:20 -04:00
Brad King 2f58c2db56 Merge topic 'curl-tls-version'
19d81b357c ci: Host our own URL to test expected TLS_VERSION failure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9928
2024-10-23 08:27:19 -04:00
Brad King 5b2351fb39 Merge topic 'curl-tls-version' into release-3.31
19d81b357c ci: Host our own URL to test expected TLS_VERSION failure

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9928
2024-10-23 08:27:18 -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 6042b5164a Tests/RunCMake/CommandLine: Match initial cache paths more precisely 2024-10-22 11:21:10 -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
Brad King ddc1359887 Merge topic 'FindBISON-empty-COMPILE_FLAGS'
3ffc8a6b61 FindBISON: Add COMMAND_EXPAND_LISTS to remove empty arguments

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9921
2024-10-22 10:29:20 -04:00
Kitware Robot 3c8704c7c0 CMake Nightly Date Stamp 2024-10-22 00:01:17 -04:00
Brad King bc69ff7c6d Tests/RunCMake/CXXModules: Improve failure message formatting 2024-10-21 19:53:46 -04:00