From 21ee3309b2a4d598bf933f644b41cd4840cde8c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20St=C3=BCrmer?= Date: Wed, 12 Jul 2017 15:45:28 +0200 Subject: VS: print comment in CSharp target only if it is actually set --- Source/cmVisualStudio10TargetGenerator.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index e4a4d6f..5570593 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -3553,7 +3553,11 @@ void cmVisualStudio10TargetGenerator::WriteEvent( (*this->BuildFileStream) << cmVS10EscapeXML(comment) << "\n"; this->WriteString("", 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"; } } -- cgit v0.12