summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalVisualStudioGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLocalVisualStudioGenerator.cxx')
-rw-r--r--Source/cmLocalVisualStudioGenerator.cxx21
1 files changed, 20 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx
index 4706a96..da214cf 100644
--- a/Source/cmLocalVisualStudioGenerator.cxx
+++ b/Source/cmLocalVisualStudioGenerator.cxx
@@ -26,6 +26,7 @@ cmLocalVisualStudioGenerator::cmLocalVisualStudioGenerator()
{
this->WindowsShell = true;
this->WindowsVSIDE = true;
+ this->NeedXMLEscape = false;
}
//----------------------------------------------------------------------------
@@ -231,8 +232,26 @@ cmLocalVisualStudioGenerator
}
else
{
- script += this->EscapeForShell(commandLine[j].c_str(),
+ if(this->NeedXMLEscape)
+ {
+ std::string arg = commandLine[j];
+ cmSystemTools::ReplaceString(arg, "&", "&");
+ cmSystemTools::ReplaceString(arg, "<", "&lt;");
+ cmSystemTools::ReplaceString(arg, ">", "&gt;");
+ if(arg.find(" ") != arg.npos)
+ {
+ std::string q("\"");
+ arg = q + arg +q;
+ }
+ script += arg;
+ //script += this->EscapeForShell(arg.c_str(),
+ //escapeAllowMakeVars);
+ }
+ else
+ {
+ script += this->EscapeForShell(commandLine[j].c_str(),
escapeAllowMakeVars);
+ }
}
}
}