summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudioGeneratorOptions.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2018-03-22 14:15:36 (GMT)
committerBrad King <brad.king@kitware.com>2018-03-26 13:35:58 (GMT)
commita0d9429bd70426b6444d3987d7023fe40e203b88 (patch)
tree50458dbc1596acc7db050447af2ce1faa7d3bcf0 /Source/cmVisualStudioGeneratorOptions.cxx
parent8aec07e0576a6121174a210dd3e3440a9f7105aa (diff)
downloadCMake-a0d9429bd70426b6444d3987d7023fe40e203b88.zip
CMake-a0d9429bd70426b6444d3987d7023fe40e203b88.tar.gz
CMake-a0d9429bd70426b6444d3987d7023fe40e203b88.tar.bz2
cmVisualStudioGeneratorOptions: Move XML code to subclasses
Diffstat (limited to 'Source/cmVisualStudioGeneratorOptions.cxx')
-rw-r--r--Source/cmVisualStudioGeneratorOptions.cxx53
1 files changed, 3 insertions, 50 deletions
diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx
index 7d7000b..26fce4b 100644
--- a/Source/cmVisualStudioGeneratorOptions.cxx
+++ b/Source/cmVisualStudioGeneratorOptions.cxx
@@ -4,47 +4,19 @@
#include "cmLocalVisualStudioGenerator.h"
#include "cmOutputConverter.h"
#include "cmSystemTools.h"
-#include "cmVisualStudio10TargetGenerator.h"
static void cmVS10EscapeForMSBuild(std::string& ret)
{
cmSystemTools::ReplaceString(ret, ";", "%3B");
}
-static std::string cmVisualStudio10GeneratorOptionsEscapeForXML(
- std::string ret)
-{
- cmSystemTools::ReplaceString(ret, "&", "&amp;");
- cmSystemTools::ReplaceString(ret, "<", "&lt;");
- cmSystemTools::ReplaceString(ret, ">", "&gt;");
- return ret;
-}
-
-static std::string cmVisualStudioGeneratorOptionsEscapeForXML(std::string ret)
-{
- cmSystemTools::ReplaceString(ret, "&", "&amp;");
- cmSystemTools::ReplaceString(ret, "\"", "&quot;");
- cmSystemTools::ReplaceString(ret, "<", "&lt;");
- cmSystemTools::ReplaceString(ret, ">", "&gt;");
- cmSystemTools::ReplaceString(ret, "\n", "&#x0D;&#x0A;");
- return ret;
-}
-
-cmVisualStudioGeneratorOptions::cmVisualStudioGeneratorOptions(
- cmLocalVisualStudioGenerator* lg, Tool tool,
- cmVisualStudio10TargetGenerator* g)
- : cmVisualStudioGeneratorOptions(lg, tool, nullptr, nullptr, g)
-{
-}
-
cmVisualStudioGeneratorOptions::cmVisualStudioGeneratorOptions(
cmLocalVisualStudioGenerator* lg, Tool tool, cmVS7FlagTable const* table,
- cmVS7FlagTable const* extraTable, cmVisualStudio10TargetGenerator* g)
+ cmVS7FlagTable const* extraTable)
: cmIDEOptions()
, LocalGenerator(lg)
, Version(lg->GetVersion())
, CurrentTool(tool)
- , TargetGenerator(g)
{
// Store the given flag tables.
this->AddTable(table);
@@ -444,28 +416,9 @@ void cmVisualStudioGeneratorOptions::SetConfiguration(
this->Configuration = config;
}
-void cmVisualStudioGeneratorOptions::OutputFlag(std::ostream& fout,
- const char* indent,
- const char* tag,
- const std::string& content)
+const std::string& cmVisualStudioGeneratorOptions::GetConfiguration() const
{
- if (this->Version >= cmGlobalVisualStudioGenerator::VS10) {
- if (!this->Configuration.empty()) {
- // if there are configuration specific flags, then
- // use the configuration specific tag for PreprocessorDefinitions
- fout << indent;
- this->TargetGenerator->WritePlatformConfigTag(tag, this->Configuration,
- 0, 0, 0, &fout);
- } else {
- fout << indent << "<" << tag << ">";
- }
- fout << cmVisualStudio10GeneratorOptionsEscapeForXML(content);
- fout << "</" << tag << ">";
- } else {
- fout << indent << tag << "=\"";
- fout << cmVisualStudioGeneratorOptionsEscapeForXML(content);
- fout << "\"";
- }
+ return this->Configuration;
}
void cmVisualStudioGeneratorOptions::OutputPreprocessorDefinitions(