mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 19:00:54 -06:00
cmSystemTools: Remove unused message-related code, simplify logic
This commit is contained in:
@@ -168,7 +168,6 @@ bool cmSystemTools::s_RunCommandHideConsole = false;
|
||||
bool cmSystemTools::s_DisableRunCommandOutput = false;
|
||||
bool cmSystemTools::s_ErrorOccured = false;
|
||||
bool cmSystemTools::s_FatalErrorOccured = false;
|
||||
bool cmSystemTools::s_DisableMessages = false;
|
||||
bool cmSystemTools::s_ForceUnixPaths = false;
|
||||
|
||||
// replace replace with with as many times as it shows up in source.
|
||||
@@ -326,14 +325,11 @@ void cmSystemTools::Stdout(const std::string& s)
|
||||
|
||||
void cmSystemTools::Message(const std::string& m, const char* title)
|
||||
{
|
||||
if (s_DisableMessages) {
|
||||
return;
|
||||
}
|
||||
if (s_MessageCallback) {
|
||||
s_MessageCallback(m, title);
|
||||
return;
|
||||
} else {
|
||||
std::cerr << m << std::endl;
|
||||
}
|
||||
std::cerr << m << std::endl << std::flush;
|
||||
}
|
||||
|
||||
void cmSystemTools::ReportLastSystemError(const char* msg)
|
||||
|
||||
@@ -266,8 +266,6 @@ public:
|
||||
|
||||
static size_t CalculateCommandLineLengthLimit();
|
||||
|
||||
static void EnableMessages() { s_DisableMessages = false; }
|
||||
static void DisableMessages() { s_DisableMessages = true; }
|
||||
static void DisableRunCommandOutput() { s_DisableRunCommandOutput = true; }
|
||||
static void EnableRunCommandOutput() { s_DisableRunCommandOutput = false; }
|
||||
static bool GetRunCommandOutput() { return s_DisableRunCommandOutput; }
|
||||
@@ -540,7 +538,6 @@ private:
|
||||
static bool s_RunCommandHideConsole;
|
||||
static bool s_ErrorOccured;
|
||||
static bool s_FatalErrorOccured;
|
||||
static bool s_DisableMessages;
|
||||
static bool s_DisableRunCommandOutput;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user