VS: print comment in CSharp target only if it is actually set

This commit is contained in:
Michael Stürmer
2017-07-12 15:45:28 +02:00
parent 5b67090d9f
commit 21ee3309b2

View File

@@ -3553,7 +3553,11 @@ void cmVisualStudio10TargetGenerator::WriteEvent(
(*this->BuildFileStream) << cmVS10EscapeXML(comment) << "</Message>\n";
this->WriteString("<Command>", 3);
} else {
if (!comment.empty()) {
std::string strippedComment = comment;
strippedComment.erase(
std::remove(strippedComment.begin(), strippedComment.end(), '\t'),
strippedComment.end());
if (!comment.empty() && !strippedComment.empty()) {
(*this->BuildFileStream) << "echo " << cmVS10EscapeXML(comment) << "\n";
}
}