diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2018-03-22 14:15:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-03-26 13:35:58 (GMT) |
commit | a0d9429bd70426b6444d3987d7023fe40e203b88 (patch) | |
tree | 50458dbc1596acc7db050447af2ce1faa7d3bcf0 /Source/cmVisualStudioGeneratorOptions.cxx | |
parent | 8aec07e0576a6121174a210dd3e3440a9f7105aa (diff) | |
download | CMake-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.cxx | 53 |
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, "&", "&"); - cmSystemTools::ReplaceString(ret, "<", "<"); - cmSystemTools::ReplaceString(ret, ">", ">"); - return ret; -} - -static std::string cmVisualStudioGeneratorOptionsEscapeForXML(std::string ret) -{ - cmSystemTools::ReplaceString(ret, "&", "&"); - cmSystemTools::ReplaceString(ret, "\"", """); - cmSystemTools::ReplaceString(ret, "<", "<"); - cmSystemTools::ReplaceString(ret, ">", ">"); - cmSystemTools::ReplaceString(ret, "\n", "
"); - 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( |