summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
authorMichael Stürmer <michael.stuermer@schaeffler.com>2017-08-30 15:40:02 (GMT)
committerMichael Stürmer <michael.stuermer@schaeffler.com>2017-09-04 09:42:35 (GMT)
commit9ed242807893becd4cd8245248fade93f7054c71 (patch)
treef25c531d66dff2d04a7fab3c834463a25018068f /Source/cmLocalVisualStudioGenerator.cxx
parent34c4108bbcb8774821ac857e0ad0a92294ee8b0b (diff)
downloadCMake-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/cmLocalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index 41025af..d772d95 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -191,13 +191,17 @@ std::string cmLocalVisualStudioGenerator::ConstructScript(
// Write each command on a single line.
for (unsigned int c = 0; c < ccg.GetNumberOfCommands(); ++c) {
+ // Add this command line.
+ std::string cmd = ccg.GetCommand(c);
+
+ if (cmd.empty()) {
+ continue;
+ }
+
// Start a new line.
script += newline;
newline = newline_text;
- // Add this command line.
- std::string cmd = ccg.GetCommand(c);
-
// Use "call " before any invocations of .bat or .cmd files
// invoked as custom commands.
//