diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2023-06-02 20:02:23 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2023-06-08 18:56:27 (GMT) |
commit | 891b60d691812c45b92d4ad2127e1559f80f8332 (patch) | |
tree | 835fea3aab501b9a2d1f431093f58e6083a8c56f /Source/cmcmd.cxx | |
parent | 5be0cd9f3c07b60b1f60ea678c1d82c38185ca27 (diff) | |
download | CMake-891b60d691812c45b92d4ad2127e1559f80f8332.zip CMake-891b60d691812c45b92d4ad2127e1559f80f8332.tar.gz CMake-891b60d691812c45b92d4ad2127e1559f80f8332.tar.bz2 |
cmUVProcessChain: Add Status::SpawnResult field
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 9929e85..1bbd0ac 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -2008,7 +2008,7 @@ int cmcmd::RunPreprocessor(const std::vector<std::string>& command, .SetBuiltinStream(cmUVProcessChainBuilder::Stream_ERROR) .AddCommand(command); auto process = builder.Start(); - if (!process.Valid()) { + if (!process.Valid() || process.GetStatus(0).SpawnResult != 0) { std::cerr << "Failed to start preprocessor."; return 1; } @@ -2016,8 +2016,7 @@ int cmcmd::RunPreprocessor(const std::vector<std::string>& command, std::cerr << "Failed to wait for preprocessor"; return 1; } - auto status = process.GetStatus(); - if (!status[0] || status[0]->ExitStatus != 0) { + if (process.GetStatus(0).ExitStatus != 0) { auto* errorStream = process.ErrorStream(); if (errorStream) { std::cerr << errorStream->rdbuf(); @@ -2130,7 +2129,7 @@ int cmcmd::RunLLVMRC(std::vector<std::string> const& args) .AddCommand(resource_compile); auto process = builder.Start(); result = 0; - if (!process.Valid()) { + if (!process.Valid() || process.GetStatus(0).SpawnResult != 0) { std::cerr << "Failed to start resource compiler."; result = 1; } else { @@ -2144,8 +2143,7 @@ int cmcmd::RunLLVMRC(std::vector<std::string> const& args) if (result != 0) { return result; } - auto status = process.GetStatus(); - if (!status[0] || status[0]->ExitStatus != 0) { + if (process.GetStatus(0).ExitStatus != 0) { auto* errorStream = process.ErrorStream(); if (errorStream) { std::cerr << errorStream->rdbuf(); |