Commit Graph

1955 Commits

Author SHA1 Message Date
Martin Duffy fcbc883fa3 cmake: Allow configuration of default script names
Adds the ``--project-file`` command-line option to modify the default script
name loaded by CMake and ``add_subdirectory`` to values other than
``CMakeLists.txt``.

Fixes: #21570
2024-12-17 12:47:02 -05:00
Brad King 7b041f7fe8 ctest: Print GENERATED_RESOURCE_SPEC_FILE property in show-only output
This was missed in commit c8c1dd0d95 (CTest: Add ability to dynamically
generate resource spec file, 2023-07-20, v3.28.0-rc1~233^2).
2024-11-25 14:18:07 -05:00
Brad King 733808150b ctest: Print custom timeout signal properties in show-only output
This was missed in commit 54c5654f7d (ctest: Optionally terminate tests
with a custom signal on timeout, 2023-05-11, v3.27.0-rc1~18^2).
2024-11-25 14:17:34 -05:00
Daniel Pfeifer 9c23f8ed26 cmCTestUpdateCommand: Remove handler usage 2024-11-13 10:54:57 +01:00
Daniel Pfeifer 255b1af5af cmCTestUpdateHandler: Move class into cmCTestUpdateCommand.cxx
Place declaration and definitions into places where following
refactoring will cause minimal deltas.
2024-11-13 10:39:44 +01:00
Daniel Pfeifer 2b052ad5ca cmCTestUploadCommand: Remove handler usage 2024-11-05 10:20:12 +01:00
Daniel Pfeifer db3ccdce41 cmCTestUploadHandler: Move class into cmCTestUploadCommand.cxx
Place declaration and definitions into places where following
refactoring will cause minimal deltas.
2024-11-05 10:20:12 +01:00
Daniel Pfeifer 8768a0c6e1 cmCTest*Command: Port away from cmCommand
Copy the necessary parts, but remove cloning and make all commands
immutable.
2024-11-05 10:20:12 +01:00
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
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 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 5aed3ee49d cmSystemTools: Add GetLogicalWorkingDirectory
Track the current working directory with symbolic links preserved.
2024-11-03 08:26:36 -05: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
Daniel Pfeifer 9fe40b33e0 cmCTest*Handler: Use default member initialization 2024-10-29 12:49:22 +01:00
Daniel Pfeifer d07a35a336 cmCTest: Remove handler instances 2024-10-29 12:49:22 +01:00
Daniel Pfeifer b64e59d571 cmCTestSubmitHandler: Initialize HttpHeaders with command line 2024-10-29 12:49:22 +01:00
Daniel Pfeifer 81e904bd53 cmCTestScriptHandler: Don't inherit from cmCTestGenericHandler
Add `cmake*` and `cmCTest*` instances and arguments where needed,
such that `GetScriptHandler` does not have to be called.
2024-10-29 12:47:41 +01:00
Daniel Pfeifer 914a355810 CTest: Remove unneeded code 2024-10-29 11:27:17 +01:00
Daniel Pfeifer 70dfb24957 cmCTestTestHandler: Consolidate simple options into cmCTestTestOptions 2024-10-29 11:26:54 +01:00
Daniel Pfeifer b43d3dcfba cmCTestTestHandler: Consolidate File options into cmCTestTestOptions 2024-10-29 11:26:27 +01:00
Daniel Pfeifer f7181175ad cmCTestTestHandler: Consolidate RegExp options into cmCTestTestOptions 2024-10-29 11:25:57 +01:00
Daniel Pfeifer 86225833f2 cmCTestTestHandler: Consolidate Output options into cmCTestTestOptions 2024-10-29 11:25:05 +01:00
Daniel Pfeifer 23c6de8808 cmCTestGenericHandler: Initialize SubmitIndex and Verbose 2024-10-29 11:18:48 +01:00
Brad King 323638f573 Merge topic 'libuv-error-mode-backport'
0f515c2d26 libuv: win/spawn: add option to use parent process error mode
728f40d4bf libuv: win/spawn: allow exception through to OS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9931
2024-10-28 09:32:24 -04:00
Brad King 8779b1ad28 Merge branch 'backport-ci-fedora-41' into ci-fedora-41 2024-10-26 06:02:18 -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
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 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
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
Brad King 074ad98ebc ctest: Explicitly normalize input paths as they exist on disk 2024-10-22 13:26:12 -04:00
Alex Turbov b6dbb0c28f cmCTestBuildAndTest.cxx: Optimize ostream::operator<< calls 2024-10-22 00:44:28 +04:00
Brad King 4b08b10900 Merge topic 'ctest-init'
80d6b20657 cmCTestStartCommand: Remove data members
0bfe17e15b cmCTest: Separate initialization of script and command line
402af107a5 cmCTest: Add GetTestGroupString function
37651800ed cmCTest: Extract functions CreateNewTag and ReadExistingTag
d28947913c cmCTest: Separate InitializeTesting function
60b822da52 cmCTest: Function ReadCustomConfigurationFileTree never fails
3c321b6571 cmCTestStartCommand: Inline InitializeFromCommand function
9fbdfa11d4 cmCTest: Separate test execution from dashboard mode
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9911
2024-10-21 09:43:25 -04:00
Daniel Pfeifer 80d6b20657 cmCTestStartCommand: Remove data members 2024-10-19 14:38:03 -04:00
Daniel Pfeifer 0bfe17e15b cmCTest: Separate initialization of script and command line 2024-10-19 14:38:03 -04:00
Daniel Pfeifer 402af107a5 cmCTest: Add GetTestGroupString function
Rename the current GetTestModelString to GetTestGroupString, because
that is what the function actually returns.  Then add a new function
GetTestGroupString that actually returns the model.
2024-10-19 14:38:02 -04:00