Commit Graph

67851 Commits

Author SHA1 Message Date
Daniel Pfeifer c98ed10d0f cmCTest*Command: Declare member functions const 2024-11-05 10:20:12 +01:00
Daniel Pfeifer 0e995d4897 cmCTest*Command: Direct use of cmExecutionStatus
Make sure that getting Makefile and setting Error is both done
through a `status` argument rather than through `cmCommand`.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer 26a697f7c1 cmCTest*Command: Access Makefile through an alias
At the top of each function that requires access to Makefile,
declare an alias `mf = this->Makefile`.  Then replace all occurrences
of `this->Makefile->` with `mf.`.  The intention is to make following
changes easier to review.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer caa449493b cmCTest*Command: Fortify argument parsing
Fix tests that pass `CDASH_UPLOAD` or `SCHEDULE_RANDOM` without an argument.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer ff2ec0387a cmCTest*Command: Generalize argument parsing and checking
Move the instantiation of unparsed arguments as well as the `parser.Parse` call
behind an abstraction.  Merge checks on `captureCMakeError`.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer 4ffc408ed9 cmCTest*Command: Loosen coupling with cmArgumentParser
Instead of inheriting from `cmArgumentParser<void>` and binding arguments by
overriding `BindArguments`, define a struct for the arguments and instantiate
a static const parser in the `InitialPass` function of each command.  Pass the
argument struct down to all functions that need to access it.
2024-11-05 10:08:23 +01:00
Daniel Pfeifer 1a2d453b94 cmCTest*Command: Access arguments through an alias
At the top of each function that requires access to arguments,
declare an alias `args = *this`.  Then access all arguments with
`args.` rather than `this->`.  The intention is to make following
changes easier to review.
2024-11-05 10:08:23 +01:00
Daniel Pfeifer c1de0976f8 cmCTest*Command: Bring all classes to a uniform layout
Make sure that all classes have a public inherited constructor, protected
data members for the arguments, followed by other private virtual functions.
The intention is to make following changes to have a smaller diff.
2024-11-05 10:08:23 +01:00
Daniel Pfeifer 73830f976a cmCTestBuildCommand: Remove GlobalGenerator member
The command object is cloned before each invocation.
The situation where the pointer is not null never occurs.
2024-11-05 10:08:23 +01:00
Kitware Robot d094dfa0c6 CMake Nightly Date Stamp 2024-11-05 00:01:37 -05:00
Brad King 384dbef61e Merge topic 'normalize-input-paths'
799602b983 cmQtAutoMocUic: Remove now-unnecessary mutex around CollapseFullPath
5ca6234d13 KWSys: Remove path translation map settings for build within CMake
74c497ca65 Merge branch 'upstream-KWSys' into normalize-input-paths
10a381e446 KWSys 2024-11-04 (bef1f021)
73dddffe32 KWSys: Disable the path translation map for build within CMake
b378781c5d cmSystemTools: Cache ToNormalizedPathOnDisk actual-case lookups
622596c6b2 cmSystemTools: Re-implement ToNormalizedPathOnDisk without translation map
5aed3ee49d cmSystemTools: Add GetLogicalWorkingDirectory

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9969
2024-11-04 10:09:16 -05:00
Brad King 799602b983 cmQtAutoMocUic: Remove now-unnecessary mutex around CollapseFullPath
KWSys's `CollapseFullPath` no longer maintains global state. The mutual
exclusion added by commit 51676cf655 (Autogen: Split JobEvalCacheT job
into separate moc and uic jobs, 2019-09-12, v3.16.0-rc1~94^2~7) and
commit 53d523f2e1 (autogen: fix race in depfile parsing, 2021-04-15,
v3.20.2~10^2) is no longer needed.
2024-11-04 10:00:17 -05:00
Brad King 5ca6234d13 KWSys: Remove path translation map settings for build within CMake
They no longer exist in KWSys.
2024-11-04 10:00:10 -05:00
Brad King 74c497ca65 Merge branch 'upstream-KWSys' into normalize-input-paths
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2024-11-04 (bef1f021)
2024-11-04 09:59:56 -05:00
KWSys Upstream 10a381e446 KWSys 2024-11-04 (bef1f021)
Code extracted from:

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

at commit bef1f0214a45fea13b16715918e513abd3636867 (master).

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

Brad King (2):
      20b2c992 SystemTools: Remove unused global object
      47dce1a3 SystemTools: Remove path translation map
2024-11-04 09:59:55 -05:00
Brad King f21c08ebbf Merge topic 'ctest-crash-handling'
0a4ee422c1 ctest: Restore Windows Error Reporting in interactive mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9855
2024-11-04 09:52:51 -05:00
Brad King 847f74d294 Merge topic 'swift-spaces'
75e4cd8d18 Ninja: Fix escaping of paths with spaces for Swift tooling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9956
2024-11-04 09:40:48 -05:00
Kitware Robot 90f9f480bb CMake Nightly Date Stamp 2024-11-04 00:03:24 -05:00
Brad King 73dddffe32 KWSys: Disable the path translation map for build within CMake
It is about to be removed from KWSys.
2024-11-03 08:32:46 -05:00
Brad King b378781c5d cmSystemTools: Cache ToNormalizedPathOnDisk actual-case lookups
Prior to re-implementing `ToNormalizedPathOnDisk`, its use of KWSys's
`GetActualCaseForPathCached` cached file actual-case lookups to avoid
redundant filesystem access.  Add caching to the actual-case lookups we
do for `cm::PathResolver`.
2024-11-03 08:30:30 -05:00
Brad King 622596c6b2 cmSystemTools: Re-implement ToNormalizedPathOnDisk without translation map
Use `cm::PathResolver`'s `LogicalPath` variant to normalize paths while
preserving symlinks not followed by `..` components.  This avoids
needing the KWSys path translation map to preserve symlinks through
`realpath` operations.  It also works with symlinks on Windows.

Fixes: #16228
2024-11-03 08:26:43 -05:00
Brad King 5aed3ee49d cmSystemTools: Add GetLogicalWorkingDirectory
Track the current working directory with symbolic links preserved.
2024-11-03 08:26:36 -05:00
Brad King f9f4ab55ac Merge topic 'path-resolver'
1a6015e5fc PathResolver: Add helper to compute normalized paths
2a6f86ec5e Tests/CMakeLib: Remove stray output from test loop
646f37b473 clang-tidy: disable modernize-concat-nested-namespaces

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9965
2024-11-03 08:19:10 -05:00
Brad King f37a5270f2 Merge topic 'update-kwsys'
88ea162db7 Merge branch 'upstream-KWSys' into update-kwsys
f09390fbf1 KWSys 2024-11-01 (1cfc8445)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9966
2024-11-03 08:17:05 -05:00
Kitware Robot 2369e65b59 CMake Nightly Date Stamp 2024-11-03 00:01:59 -04:00
Kitware Robot 08878dcc29 CMake Nightly Date Stamp 2024-11-02 00:01:25 -04:00
KWSys Upstream f09390fbf1 KWSys 2024-11-01 (1cfc8445)
Code extracted from:

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

at commit 1cfc8445570dc46883e84301eb6c31ebc5867826 (master).

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

Brad King (1):
      fdf4f2f8 SystemTools: Fix ReadSymlink for links to absolute paths on Windows
2024-11-01 10:04:53 -04:00
Brad King 88ea162db7 Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2024-11-01 (1cfc8445)
2024-11-01 10:04:53 -04:00
Dylan Snelgrove 0a4ee422c1 ctest: Restore Windows Error Reporting in interactive mode
This behavior was removed when we switched to libuv in CMake 3.11.
After backporting new changes from libuv v2, we can restore the
behavior.

Fixes: #20115
2024-11-01 09:56:54 -04:00
Brad King 9fdf716ee8 Merge topic 'debug-adapter-value-formatting'
41621c3afb Debugger: Add Value Formatting support for StackTrace request

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9940
2024-11-01 09:16:18 -04:00
Brad King 5317d9267a Merge topic 'load-command'
3f55f5264d cmLoadCommandCommand: Port away from cmCommand

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9962
2024-11-01 09:15:05 -04:00
Brad King 60977c2ef2 Merge topic 'ctest-handler-refactoring'
9fe40b33e0 cmCTest*Handler: Use default member initialization
d07a35a336 cmCTest: Remove handler instances
b64e59d571 cmCTestSubmitHandler: Initialize HttpHeaders with command line
81e904bd53 cmCTestScriptHandler: Don't inherit from cmCTestGenericHandler
914a355810 CTest: Remove unneeded code
70dfb24957 cmCTestTestHandler: Consolidate simple options into cmCTestTestOptions
b43d3dcfba cmCTestTestHandler: Consolidate File options into cmCTestTestOptions
f7181175ad cmCTestTestHandler: Consolidate RegExp options into cmCTestTestOptions
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9926
2024-11-01 09:14:11 -04:00
Brad King 7b23e2f884 Merge topic 'find_package-user-dir-not-ignored'
230e5ec172 find_package: Don't test <name>_DIR against ignored paths

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9961
2024-11-01 09:13:20 -04:00
Brad King a9a7d44a4c Merge topic 'compiler-abi-no-pipe'
ec22cf1a67 CMakeDetermineCompilerABI: Strip -pipe from compile flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9960
2024-11-01 09:12:33 -04:00
Brad King 7ec57887fa Merge branch 'release-3.31' 2024-11-01 09:10:32 -04:00
Brad King b6c4aa9c10 Merge branch 'release-3.30' 2024-11-01 09:10:30 -04:00
Brad King 76f52d6462 Merge branch 'release-3.30' into release-3.31 2024-11-01 09:10:23 -04:00
Brad King c6e71e0926 Merge branch 'release-3.31' 2024-11-01 09:09:53 -04:00
Brad King baec4a8559 Merge topic 'ci-vcvarsall-fix'
c1ddff67f2 ci: use JSON to transfer environment variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9963
2024-11-01 09:09:53 -04:00
Brad King 4002b6c60a Merge topic 'ci-vcvarsall-fix' into release-3.31
c1ddff67f2 ci: use JSON to transfer environment variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9963
2024-11-01 09:09:51 -04:00
Brad King b7d5e6848d Merge topic 'ci-vcvarsall-fix' into release-3.30
c1ddff67f2 ci: use JSON to transfer environment variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9963
2024-11-01 09:09:02 -04:00
Brad King d2b9723ad8 Merge branch 'release-3.31' 2024-11-01 09:07:36 -04:00
Brad King 56455644fe Merge branch 'release-3.30' 2024-11-01 09:07:34 -04:00
Brad King 9e16cd5efb Merge branch 'release-3.30' into release-3.31 2024-11-01 09:06:41 -04:00
Brad King 9d67a39688 Merge branch 'release-3.31' 2024-11-01 09:06:03 -04:00
Brad King e98b1fc2b4 Merge topic 'ci-use-only-needs'
70fd49f0cf Merge branch 'ci-use-only-needs-3.30' into ci-use-only-needs
ea31d090c7 gitlab-ci: remove `dependencies` from jobs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9964
2024-11-01 09:06:03 -04:00
Brad King 760e0f1c03 Merge topic 'ci-use-only-needs' into release-3.31
70fd49f0cf Merge branch 'ci-use-only-needs-3.30' into ci-use-only-needs
ea31d090c7 gitlab-ci: remove `dependencies` from jobs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9964
2024-11-01 09:06:02 -04:00
Brad King e6be67d204 Merge topic 'ci-use-only-needs' into release-3.30
ea31d090c7 gitlab-ci: remove `dependencies` from jobs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9964
2024-11-01 09:04:47 -04:00
Winfried Auner 75e4cd8d18 Ninja: Fix escaping of paths with spaces for Swift tooling
If a path inside a project contains spaces, the generated Ninja
definitions previously contained superfluous quotes.

Fixes: #26404
2024-11-01 08:59:32 -04:00
Brad King 1a6015e5fc PathResolver: Add helper to compute normalized paths
Create a `cm::PathResolver` helper to compute normalized paths.
Provide a common implementation with compile-time dispatch to
select details w.r.t. symbolic links, existence, and matching
the on-disk case of existing paths.  Later we can use this to
implement:

* `ToNormalizedPathOnDisk`: Normalizes paths while resolving symlinks
  only when followed by `..` components.  Does not require paths to
  exist, but reads on-disk case of paths that do exist (on Windows).

* `GetRealPath`: Normalizes paths while resolving all symlinks.
   Requires paths to exist, and reads their on-disk case (on Windows).

* `CollapseFullPath`: Normalizes paths in memory without disk access.
  Assumes components followed by `..` components are not symlinks.

Abstract filesystem access through runtime dispatch so that we can test
Windows symbolic link and network path behavior without relying on real
environments.  The overhead of runtime dispatch should be insignificant
during real filesystem access.

Issue: #16228
Issue: #17206
2024-11-01 08:44:17 -04:00