summaryrefslogtreecommitdiffstats
path: root/Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx')
-rw-r--r--Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx b/Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx
index f14de55..2139b4b 100644
--- a/Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx
+++ b/Source/cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.cxx
@@ -34,7 +34,7 @@ bool cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool::GetFileInfo(
builder.AddCommand(command);
auto process = builder.Start();
- if (!process.Valid()) {
+ if (!process.Valid() || process.GetStatus(0).SpawnResult != 0) {
std::ostringstream e;
e << "Failed to start objdump process for:\n " << file;
this->SetError(e.str());
@@ -57,8 +57,7 @@ bool cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool::GetFileInfo(
this->SetError(e.str());
return false;
}
- auto status = process.GetStatus();
- if (!status[0] || status[0]->ExitStatus != 0) {
+ if (process.GetStatus(0).ExitStatus != 0) {
std::ostringstream e;
e << "Failed to run objdump on:\n " << file;
this->SetError(e.str());