Commit b12affd7 authored by Brad King's avatar Brad King Committed by Kitware Robot

Merge topic 'no-define-cout-cerr'

53858177 Do not define cout/cerr preprocessor symbols
parents 22605f1e 53858177
......@@ -32,16 +32,6 @@ class cmMakefile;
cmCPackLog_msg.str().c_str()); \
} while (0)
#ifdef cerr
#undef cerr
#endif
#define cerr no_cerr_use_cmCPack_Log
#ifdef cout
#undef cout
#endif
#define cout no_cout_use_cmCPack_Log
/** \class cmCPackGenerator
* \brief A superclass of all CPack Generators
*
......
......@@ -15,8 +15,6 @@ cmCPackLog::cmCPackLog()
this->NewLine = true;
this->LastTag = cmCPackLog::NOTAG;
#undef cerr
#undef cout
this->DefaultOutput = &std::cout;
this->DefaultError = &std::cerr;
......
......@@ -19,16 +19,6 @@
(ctSelf)->Log(logType, __FILE__, __LINE__, cmCPackLog_msg.str().c_str()); \
} while (0)
#ifdef cerr
#undef cerr
#endif
#define cerr no_cerr_use_cmCPack_Log
#ifdef cout
#undef cout
#endif
#define cout no_cout_use_cmCPack_Log
/** \class cmCPackLog
* \brief A container for CPack generators
*
......
......@@ -415,9 +415,7 @@ int main(int argc, char const* const* argv)
}
doc.SetSection("Generators", v);
#undef cout
return doc.PrintRequestedDocumentation(std::cout) ? 0 : 1;
#define cout no_cout_use_cmCPack_Log
}
if (cmSystemTools::GetErrorOccuredFlag()) {
......
......@@ -375,11 +375,7 @@ void cmCTestMemCheckHandler::GenerateDartOutput(cmXMLWriter& xml)
xml.StartElement("DefectList");
for (cc = 0; cc < this->GlobalResults.size(); cc++) {
if (this->GlobalResults[cc]) {
#ifdef cerr
#undef cerr
#endif
std::cerr.width(35);
#define cerr no_cerr
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
this->ResultStringsLong[cc]
<< " - " << this->GlobalResults[cc] << std::endl,
......
......@@ -2651,13 +2651,6 @@ static const char* cmCTestStringLogType[] = { "DEBUG",
"ERROR_MESSAGE",
CM_NULLPTR };
#ifdef cerr
#undef cerr
#endif
#ifdef cout
#undef cout
#endif
#define cmCTestLogOutputFileLine(stream) \
if (this->ShowLineNumbers) { \
(stream) << std::endl << file << ":" << line << " "; \
......
......@@ -163,11 +163,7 @@ int main(int argc, char const* const* argv)
doc.SetSection("Name", cmDocumentationName);
doc.SetSection("Usage", cmDocumentationUsage);
doc.PrependSection("Options", cmDocumentationOptions);
#ifdef cout
#undef cout
#endif
return doc.PrintRequestedDocumentation(std::cout) ? 0 : 1;
#define cout no_cout_use_cmCTestLog
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment