diff options
Diffstat (limited to 'Source/cmLocalVisualStudioGenerator.cxx')
-rw-r--r-- | Source/cmLocalVisualStudioGenerator.cxx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index 41025af..bbb91e0 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -78,12 +78,12 @@ void cmLocalVisualStudioGenerator::ComputeObjectFilenames( } } -CM_AUTO_PTR<cmCustomCommand> +std::unique_ptr<cmCustomCommand> cmLocalVisualStudioGenerator::MaybeCreateImplibDir(cmGeneratorTarget* target, const std::string& config, bool isFortran) { - CM_AUTO_PTR<cmCustomCommand> pcc; + std::unique_ptr<cmCustomCommand> pcc; // If an executable exports symbols then VS wants to create an // import library but forgets to create the output directory. @@ -135,7 +135,7 @@ std::string cmLocalVisualStudioGenerator::ConstructScript( std::string workingDirectory = ccg.GetWorkingDirectory(); // Avoid leading or trailing newlines. - std::string newline = ""; + std::string newline; // Line to check for error between commands. std::string check_error = newline_text; @@ -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. // |