BUG: Add a safety check so that you cannot send cmOStringStream.str() to other stream and produce the funky hex number. This makes it impossible to compile such a code. Adding that exposed a whole bunch of places in CMake where streams were used wrongly
This commit is contained in:
parent
d5763a8c98
commit
ae50b4bc6a
|
@ -4508,7 +4508,7 @@ int cmCTest::RunCMakeAndTest(std::string* outstring)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cerr << out << "\n";
|
std::cerr << out.str() << "\n";
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -4527,7 +4527,7 @@ int cmCTest::RunCMakeAndTest(std::string* outstring)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cerr << out << "\n";
|
std::cerr << out.str() << "\n";
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -4607,7 +4607,7 @@ int cmCTest::RunCMakeAndTest(std::string* outstring)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cerr << out << "\n";
|
std::cerr << out.str() << "\n";
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -4639,7 +4639,7 @@ int cmCTest::RunCMakeAndTest(std::string* outstring)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cerr << out << "\n";
|
std::cerr << out.str() << "\n";
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -4671,7 +4671,7 @@ int cmCTest::RunCMakeAndTest(std::string* outstring)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout << out << "\n";
|
std::cout << out.str() << "\n";
|
||||||
}
|
}
|
||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
|
@ -252,6 +252,9 @@ private:
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Poison this operator to avoid common mistakes. */
|
||||||
|
extern void operator << (std::ostream&, const cmOStringStream&);
|
||||||
|
|
||||||
/** Standard documentation entry for cmDocumentation's formatting. */
|
/** Standard documentation entry for cmDocumentation's formatting. */
|
||||||
struct cmDocumentationEntry
|
struct cmDocumentationEntry
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue