From 29a0642ba78392ab20037e677d28eae2eea23de7 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 23 Jul 2014 14:59:23 -0400 Subject: VS: Encode mapped flag values in XML project files (#15031) Teach cmVisualStudioGeneratorOptions to encode FlagMap entries and the FlagString value properly in vcproj/vcxproj XML files. Update the one existing call site that pre-encoded the value to not do so. --- Source/cmLocalVisualStudio7Generator.cxx | 2 +- Source/cmVisualStudioGeneratorOptions.cxx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index e0fe0fd..3ed4a48 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1013,7 +1013,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, if(!this->ModuleDefinitionFile.empty()) { std::string defFile = - this->ConvertToXMLOutputPath(this->ModuleDefinitionFile.c_str()); + this->ConvertToOptionallyRelativeOutputPath(this->ModuleDefinitionFile); linkOptions.AddFlag("ModuleDefinitionFile", defFile.c_str()); } switch(target.GetType()) diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 2c43ad2..b14fc45 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -321,7 +321,7 @@ cmVisualStudioGeneratorOptions for(std::vector::iterator i = m->second.begin(); i != m->second.end(); ++i) { - fout << sep << *i; + fout << sep << cmVisualStudio10GeneratorOptionsEscapeForXML(*i); sep = ";"; } if (m->first == "AdditionalIncludeDirectories") @@ -341,7 +341,7 @@ cmVisualStudioGeneratorOptions for(std::vector::iterator i = m->second.begin(); i != m->second.end(); ++i) { - fout << sep << *i; + fout << sep << cmVisualStudioGeneratorOptionsEscapeForXML(*i); sep = ";"; } fout << "\"\n"; @@ -373,7 +373,7 @@ cmVisualStudioGeneratorOptions { fout << ""; } - fout << this->FlagString.c_str() + fout << cmVisualStudio10GeneratorOptionsEscapeForXML(this->FlagString) << " %(AdditionalOptions)\n"; } else -- cgit v0.12