From b07b1aa416ecd90110937ee3cd84b9f9c8be5e8d Mon Sep 17 00:00:00 2001 From: Robert Dailey Date: Thu, 25 Jan 2018 16:01:46 -0600 Subject: VS: Use newline for empty DebugInformationFormat tags Previously, code wrote out empty tags for `` like so: This gets corrected by Visual Studio 2017 when saving the solution. The correction appears as: In the spirit of keeping the XML structure as close to what Visual Studio expects as possible, a newline is inserted after the opening tag in the empty case. --- Source/cmVisualStudio10TargetGenerator.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 4555358..e15e833 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2563,11 +2563,12 @@ void cmVisualStudio10TargetGenerator::WriteClOptions( } // If not in debug mode, write the DebugInformationFormat field - // without value so PDBs don't get generated uselessly. + // without value so PDBs don't get generated uselessly. Each tag + // goes on its own line because Visual Studio corrects it this + // way when saving the project after CMake generates it. if (!clOptions.IsDebug()) { - this->WriteString("" - "\n", - 3); + this->WriteString("\n", 3); + this->WriteString("\n", 3); } // Specify the compiler program database file if configured. -- cgit v0.12