diff options
author | Michael Stürmer <michael.stuermer@schaeffler.com> | 2017-08-30 15:40:02 (GMT) |
---|---|---|
committer | Michael Stürmer <michael.stuermer@schaeffler.com> | 2017-09-04 09:42:35 (GMT) |
commit | 9ed242807893becd4cd8245248fade93f7054c71 (patch) | |
tree | f25c531d66dff2d04a7fab3c834463a25018068f /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 34c4108bbcb8774821ac857e0ad0a92294ee8b0b (diff) | |
download | CMake-9ed242807893becd4cd8245248fade93f7054c71.zip CMake-9ed242807893becd4cd8245248fade93f7054c71.tar.gz CMake-9ed242807893becd4cd8245248fade93f7054c71.tar.bz2 |
VS: only add custom command line if it is not empty
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 86099eb..2b3d40f 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -3536,11 +3536,13 @@ void cmVisualStudio10TargetGenerator::WriteEvent( for (std::vector<cmCustomCommand>::const_iterator i = commands.begin(); i != commands.end(); ++i) { cmCustomCommandGenerator ccg(*i, configName, this->LocalGenerator); - comment += pre; - comment += lg->ConstructComment(ccg); - script += pre; - pre = "\n"; - script += cmVS10EscapeXML(lg->ConstructScript(ccg)); + if (!ccg.HasOnlyEmptyCommandLines()) { + comment += pre; + comment += lg->ConstructComment(ccg); + script += pre; + pre = "\n"; + script += cmVS10EscapeXML(lg->ConstructScript(ccg)); + } } comment = cmVS10EscapeComment(comment); if (this->ProjectType != csproj) { |