summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-07-29 18:41:03 (GMT)
committerBrad King <brad.king@kitware.com>2014-08-12 14:08:44 (GMT)
commitf063a914c649b1dfbcd1a02d381b4e94ad01ceaa (patch)
treeef1fa8605c492ea765dddbee9a8a08660517107a /Source/cmVisualStudio10TargetGenerator.cxx
parent2b20110f681d180f12f4c200df1489eeb242d1b2 (diff)
downloadCMake-f063a914c649b1dfbcd1a02d381b4e94ad01ceaa.zip
CMake-f063a914c649b1dfbcd1a02d381b4e94ad01ceaa.tar.gz
CMake-f063a914c649b1dfbcd1a02d381b4e94ad01ceaa.tar.bz2
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.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx14
1 files changed, 13 insertions, 1 deletions
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("</", 2);
+ (*this->BuildFileStream) << tool << ">\n";
+ }
+ else
+ {
+ this->WriteSource(tool, sf);
+ }
}
void cmVisualStudio10TargetGenerator::WriteSource(