Browse Source

Do not define cout/cerr preprocessor symbols

Apply the change from commit bd3d0eaf (cmCTest: don't redefine cout and
cerr, 2016-09-01) to the rest of ctest and cpack.  These definitions
are no longer needed because our conventions are well established.
Brad King 9 years ago
parent
commit
5385817762

+ 0 - 10
Source/CPack/cmCPackGenerator.h

@@ -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
  *

+ 0 - 2
Source/CPack/cmCPackLog.cxx

@@ -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;
 

+ 0 - 10
Source/CPack/cmCPackLog.h

@@ -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
  *

+ 0 - 2
Source/CPack/cpack.cxx

@@ -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()) {

+ 0 - 4
Source/CTest/cmCTestMemCheckHandler.cxx

@@ -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,

+ 0 - 7
Source/cmCTest.cxx

@@ -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 << " ";                      \

+ 0 - 4
Source/ctest.cxx

@@ -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
     }
   }