summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorRobert Dailey <rcdailey@gmail.com>2018-01-25 22:01:46 (GMT)
committerRobert Dailey <rcdailey@gmail.com>2018-01-26 15:52:59 (GMT)
commitb07b1aa416ecd90110937ee3cd84b9f9c8be5e8d (patch)
treedc0da73d0c5188ae76b6dd69879efef8bfd0186a /Source
parenta24dbba3482d5c5b8542c56047ec78dd40215a06 (diff)
downloadCMake-b07b1aa416ecd90110937ee3cd84b9f9c8be5e8d.zip
CMake-b07b1aa416ecd90110937ee3cd84b9f9c8be5e8d.tar.gz
CMake-b07b1aa416ecd90110937ee3cd84b9f9c8be5e8d.tar.bz2
VS: Use newline for empty DebugInformationFormat tags
Previously, code wrote out empty tags for `<DebugInformationFormat>` like so: <DebugInformationFormat></DebugInformationFormat> This gets corrected by Visual Studio 2017 when saving the solution. The correction appears as: <DebugInformationFormat> </DebugInformationFormat> 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.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx9
1 files 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("<DebugInformationFormat>"
- "</DebugInformationFormat>\n",
- 3);
+ this->WriteString("<DebugInformationFormat>\n", 3);
+ this->WriteString("</DebugInformationFormat>\n", 3);
}
// Specify the compiler program database file if configured.