diff options
author | Brad King <brad.king@kitware.com> | 2017-07-14 12:22:43 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-07-14 12:22:59 (GMT) |
commit | 38f81fab720ccf5eef6c94ffa2c84f7bb6c005d9 (patch) | |
tree | 28ef037965452f20f1a4d726272b9df2c188b1a6 | |
parent | 652b2956c85987300fe0092ecf476fe305e2aecd (diff) | |
parent | 21ee3309b2a4d598bf933f644b41cd4840cde8c3 (diff) | |
download | CMake-38f81fab720ccf5eef6c94ffa2c84f7bb6c005d9.zip CMake-38f81fab720ccf5eef6c94ffa2c84f7bb6c005d9.tar.gz CMake-38f81fab720ccf5eef6c94ffa2c84f7bb6c005d9.tar.bz2 |
Merge topic 'vs_csharp_add_custom_command_comment'
21ee3309 VS: print comment in CSharp target only if it is actually set
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1049
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
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) << "</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"; } } |