VS: only add custom command line if it is not empty

This commit is contained in:
Michael Stürmer
2017-08-30 17:40:02 +02:00
parent 34c4108bbc
commit 9ed2428078
6 changed files with 113 additions and 8 deletions

View File

@@ -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.
//