Commit Graph
11 Commits
Author SHA1 Message Date
Daksh Mamodiya ae5f506906 Install: Exit non-zero when an install script fails
`cmake --install` did not propagate per-script failures into its
process exit code.

In parallel mode, cmInstallScriptHandler::Install spawned each install
script as a child process but never inspected the child exit status or
termination signal, and always returned 0.  It now reads each child's
status after the event loop, prints the failing script's exit code or
signal, and returns non-zero if any script failed.  A failed parallel
install also no longer writes the combined install_manifest.txt, so a
partial manifest is not mistaken for a complete install.

In serial mode, GetScripts() returns the top-level cmake_install.cmake
once per component and per configuration, so multiple scripts run only
when installing several components or configurations at once.  The loop
overwrote its result on every iteration, so an earlier script that
failed via cmake_language(EXIT) was masked by a later one that
succeeded.  The loop now stops at the first failure.  This is a no-op
for a single component and configuration; it changes only installs of
multiple components or configurations, which now stop at the first
failed script and report it instead of attempting the rest.

Fixes: #27906
2026-06-30 18:06:50 +02:00
Matthew Woehlke 732b9585a7 Style: Use camelCase identifiers
Fix most snake_case identifiers in cmInstall* to use camelCase instead.

Also, update clang-tidy configuration to help with applying these
changes, though the relevant check remains off by default.
2026-05-06 11:17:02 -04:00
Robert Maynard bd605ba9e6 cmake --install: Support multiple --components
Issue: #25178
2026-03-09 13:47:58 -04:00
Brad King c94d70c345 cmUVProcessChain: Open output streams automatically
Avoid repeating the logic at every call site.
2025-12-19 07:52:29 -05:00
Martin Duffy 3db07b0189 cmInstallScriptHandler: Refactor to store config and path for each command 2025-09-24 12:41:32 -04:00
Kitware Robot 1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Kitware Robot 0b96ae1f6a Revise C++ coding style using clang-format with "east const"
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`, now with "east const" enforcement.
Use `clang-format` version 18.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.

Issue: #26123
2025-01-23 13:09:50 -05:00
Martin Duffy 097d4fd1b5 instrumentation: Collect and record project build system metrics
Add a feature for collecting build instrumentation for CMake projects.

Issue: #26099
2025-01-15 09:16:50 -05:00
Martin Duffy ea8e3107ec cmake --install: Respect CMAKE_DEFAULT_CONFIGS
When `cmake --install` is run with no `--config` passed, use
`CMAKE_DEFAULT_CONFIGS` to determine which config(s) to install.

Fixes: #21475
2024-11-19 11:37:47 -05:00
Martin Duffy 9799491c7e install: Write manifest file in parallel install
Updates the parallel install to generate the install_manifest.txt file.
2024-07-25 12:36:32 -04:00
Martin Duffy 159ba027b9 Install: Add parallel installation option
Fixes: #26000
2024-07-15 11:49:29 -04:00