From f063a914c649b1dfbcd1a02d381b4e94ad01ceaa Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 29 Jul 2014 14:41:03 -0400 Subject: VS: Re-arrange WriteExtraSource to support tool configuration Add a code path to write the tool open and close elements separately so that we can add content in between to configure it. --- Source/cmVisualStudio10TargetGenerator.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 1e9e8e8..3dadd52 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1018,6 +1018,7 @@ void cmVisualStudio10TargetGenerator::WriteHeaderSource(cmSourceFile const* sf) void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) { + bool toolHasSettings = false; std::string tool = "None"; std::string const& ext = sf->GetExtension(); if(ext == "appxmanifest") @@ -1033,7 +1034,18 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) { tool = "XML"; } - this->WriteSource(tool, sf); + + if(toolHasSettings) + { + this->WriteSource(tool, sf, ">\n"); + + this->WriteString("BuildFileStream) << tool << ">\n"; + } + else + { + this->WriteSource(tool, sf); + } } void cmVisualStudio10TargetGenerator::WriteSource( -- cgit v0.12