Browse Source

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

Michael Stürmer 8 years ago
parent
commit
21ee3309b2
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Source/cmVisualStudio10TargetGenerator.cxx

+ 5 - 1
Source/cmVisualStudio10TargetGenerator.cxx

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