diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2016-04-24 13:00:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-04-25 14:38:58 (GMT) |
commit | 9b58190c8fb1e48ce02480f6a71f561f45299379 (patch) | |
tree | 7c200de5345f7ba7640104916b1edd031789f1c5 /Source/cmQtAutoGeneratorInitializer.cxx | |
parent | 657a446175c1b61999a77958c5b7480f8be041a5 (diff) | |
download | CMake-9b58190c8fb1e48ce02480f6a71f561f45299379.zip CMake-9b58190c8fb1e48ce02480f6a71f561f45299379.tar.gz CMake-9b58190c8fb1e48ce02480f6a71f561f45299379.tar.bz2 |
Autogen: Message cleanups: Compose messages in std::stringstream
To avoid Race conditions with other processes writing to stdout/stderr compose
the whole message in a std::stringstream then submit the single complete message.
Diffstat (limited to 'Source/cmQtAutoGeneratorInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGeneratorInitializer.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index ea9ea7c..9b2362a 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -592,8 +592,10 @@ static std::string ListQt5RccInputs(cmSourceFile* sf, &retVal, 0, cmSystemTools::OUTPUT_NONE); if (!result || retVal) { - std::cerr << "AUTOGEN: error: Rcc list process for " << sf->GetFullPath() - << " failed:\n" << rccStdOut << "\n" << rccStdErr << std::endl; + std::stringstream err; + err << "AUTOGEN: error: Rcc list process for " << sf->GetFullPath() + << " failed:\n" << rccStdOut << "\n" << rccStdErr << std::endl; + std::cerr << err.str(); return std::string(); } @@ -623,8 +625,10 @@ static std::string ListQt5RccInputs(cmSourceFile* sf, std::string::size_type pos = eline.find(searchString); if (pos == std::string::npos) { - std::cerr << "AUTOGEN: error: Rcc lists unparsable output " - << eline << std::endl; + std::stringstream err; + err << "AUTOGEN: error: Rcc lists unparsable output " + << eline << std::endl; + std::cerr << err.str(); return std::string(); } pos += searchString.length(); |