cmProcess: Remove unused ReportStatus method

This commit is contained in:
Bryon Bean
2017-10-23 08:16:45 -04:00
committed by Brad King
parent c13b68e61f
commit 5238e6db70
2 changed files with 0 additions and 61 deletions

View File

@@ -3,7 +3,6 @@
#include "cmProcess.h"
#include "cmProcessOutput.h"
#include <iostream>
cmProcess::cmProcess()
{
@@ -166,64 +165,6 @@ int cmProcess::GetProcessStatus()
return cmsysProcess_GetState(this->Process);
}
int cmProcess::ReportStatus()
{
int result = 1;
switch (cmsysProcess_GetState(this->Process)) {
case cmsysProcess_State_Starting: {
std::cerr << "cmProcess: Never started " << this->Command
<< " process.\n";
} break;
case cmsysProcess_State_Error: {
std::cerr << "cmProcess: Error executing " << this->Command
<< " process: " << cmsysProcess_GetErrorString(this->Process)
<< "\n";
} break;
case cmsysProcess_State_Exception: {
std::cerr << "cmProcess: " << this->Command
<< " process exited with an exception: ";
switch (cmsysProcess_GetExitException(this->Process)) {
case cmsysProcess_Exception_None: {
std::cerr << "None";
} break;
case cmsysProcess_Exception_Fault: {
std::cerr << "Segmentation fault";
} break;
case cmsysProcess_Exception_Illegal: {
std::cerr << "Illegal instruction";
} break;
case cmsysProcess_Exception_Interrupt: {
std::cerr << "Interrupted by user";
} break;
case cmsysProcess_Exception_Numerical: {
std::cerr << "Numerical exception";
} break;
case cmsysProcess_Exception_Other: {
std::cerr << "Unknown";
} break;
}
std::cerr << "\n";
} break;
case cmsysProcess_State_Executing: {
std::cerr << "cmProcess: Never terminated " << this->Command
<< " process.\n";
} break;
case cmsysProcess_State_Exited: {
result = cmsysProcess_GetExitValue(this->Process);
std::cerr << "cmProcess: " << this->Command
<< " process exited with code " << result << "\n";
} break;
case cmsysProcess_State_Expired: {
std::cerr << "cmProcess: killed " << this->Command
<< " process due to timeout.\n";
} break;
case cmsysProcess_State_Killed: {
std::cerr << "cmProcess: killed " << this->Command << " process.\n";
} break;
}
return result;
}
void cmProcess::ChangeTimeout(std::chrono::duration<double> t)
{
this->Timeout = t;

View File

@@ -32,8 +32,6 @@ public:
// return the process status
int GetProcessStatus();
// Report the status of the program
int ReportStatus();
int GetId() { return this->Id; }
void SetId(int id) { this->Id = id; }
int GetExitValue() { return this->ExitValue; }