mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-12 12:15:34 +00:00
`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
1.5 KiB
1.5 KiB