`include-what-you-use` diagnostics, in practice, are specific to
the environment's compiler and standard library. Update includes
to satisfy IWYU for our CI job under Debian 13. Some patterns:
* Types named in virtual `override` signatures no longer require
includes since the overridden signature already names them.
* A function argument's type needs to be included even if its constructor
is called only by implicit conversion. For example, constructing a
`std::function` from a lambda now requires `<functional>`.
* Some prior mysterious `<type_traits>` inclusions are no longer required.
Previously it initialized as `PROJECT` to support reconfiguration with
VS generators, but didn't actually add any commands until needed.
Instead initialize as the `INTERNAL` role and update when adding
commands.
The explicit initialization with empty paths from commit 57bdc1a2f7
(cmState: Compute and store directory components., 2015-05-04,
v3.3.0-rc1~61^2~4) has not been needed since commit 6afd35b98a (cmState:
remove unused code, 2016-06-16, v3.7.0-rc1~90^2).
The save/restore from commit 427b6da9e5 (VS: Teach `cmake --build` to
reconfigure if needed before building, 2016-09-16, v3.8.0-rc1~290^2)
is unnecessary because `cmake::Build` does not rely on the source
and build directory being initialized.
Create a single place to store target data to prevent duplication.
This moves `targetType` and `targetLabels` out of the snippet files
and into a target map in the `cmakeContent` file referenced by each
snippet.
Fixes: #27244
If the command for a step (cmake, ctest, or cpack) terminates abnormally,
libuv sets the exit code to 0 and reports the process termination signal
in a separate struct member. That carries through to the structure we use
to track the process and ultimately give back to the workflow step loop.
Don't rely on the exit code alone to test for failure, also check for spawning
errors and abnormal termination too.
Fixes: #27273
2fdd1e787f instrumentation: Additional data in custom, install and link snippets
3db07b0189 cmInstallScriptHandler: Refactor to store config and path for each command
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !11241
- Include `config` in all `install` and `custom` snippets
- Include `target` for `custom` snippets where applicable
- Document and test inclusion of `language` in `link` snippets
Issue: #27244
Adds new `cdashSubmit` and `cdashVerbose` options to allow enabling
instrumentation in CDash submissions using query files or the
`cmake_instrumentation` command.
Fixes: #26783, #26727
This improves the output of JSON-related error messages. It adds the filename to
the output and excludes the column number.
This is particularly useful when there are multiple JSON files being read that
could be responsible for an error, ie CMakePresets.json and
CMakeUserPresets.json, or multiple instrumentation queries.
Issue: #26717
Extend commit 1a35351125 (Add CMAKE_POLICY_VERSION_MINIMUM to help
configure outdated projects, 2025-02-13, v4.0.0-rc1~12^2) with an
environment variable to initialize the cache entry. That will make it
easier to use when `cmake` is invoked under layers of scripting.
Closes: #26715