mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 14:50:10 -06:00
cmProcess: Remove unused ReportStatus method
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user