BUG: Fixed XML escapes for custom commands. Also added escaping of newlines for VS 2005.
This commit is contained in:
parent
0df3c162fb
commit
8dc8232027
@ -1162,8 +1162,6 @@ WriteCustomRule(std::ostream& fout,
|
|||||||
const char *output,
|
const char *output,
|
||||||
const char* compileFlags)
|
const char* compileFlags)
|
||||||
{
|
{
|
||||||
std::string cmd = command;
|
|
||||||
cmSystemTools::ReplaceString(cmd, "\"", """);
|
|
||||||
std::vector<std::string>::iterator i;
|
std::vector<std::string>::iterator i;
|
||||||
std::vector<std::string> *configs =
|
std::vector<std::string> *configs =
|
||||||
static_cast<cmGlobalVisualStudio7Generator *>(m_GlobalGenerator)->GetConfigurations();
|
static_cast<cmGlobalVisualStudio7Generator *>(m_GlobalGenerator)->GetConfigurations();
|
||||||
@ -1183,7 +1181,8 @@ WriteCustomRule(std::ostream& fout,
|
|||||||
<< "\t\t\t\t\tDescription=\"Building " << comment;
|
<< "\t\t\t\t\tDescription=\"Building " << comment;
|
||||||
fout << " " << output;
|
fout << " " << output;
|
||||||
fout << "\"\n"
|
fout << "\"\n"
|
||||||
<< "\t\t\t\t\tCommandLine=\"" << cmd << "\n\"\n"
|
<< "\t\t\t\t\tCommandLine=\""
|
||||||
|
<< this->EscapeForXML(command) << "\"\n"
|
||||||
<< "\t\t\t\t\tAdditionalDependencies=\"";
|
<< "\t\t\t\t\tAdditionalDependencies=\"";
|
||||||
// Write out the dependencies for the rule.
|
// Write out the dependencies for the rule.
|
||||||
std::string temp;
|
std::string temp;
|
||||||
@ -1381,6 +1380,7 @@ std::string cmLocalVisualStudio7Generator::EscapeForXML(const char* s)
|
|||||||
cmSystemTools::ReplaceString(ret, "\"", """);
|
cmSystemTools::ReplaceString(ret, "\"", """);
|
||||||
cmSystemTools::ReplaceString(ret, "<", "<");
|
cmSystemTools::ReplaceString(ret, "<", "<");
|
||||||
cmSystemTools::ReplaceString(ret, ">", ">");
|
cmSystemTools::ReplaceString(ret, ">", ">");
|
||||||
|
cmSystemTools::ReplaceString(ret, "\n", "
");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user