Fix XML escaping for target names in Eclipse project files (#11658)

Alex
This commit is contained in:
Alex Neundorf 2011-02-12 21:54:02 +01:00
parent cb94587a88
commit 8074bca93c
1 changed files with 3 additions and 2 deletions

View File

@ -1001,15 +1001,16 @@ void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout,
const std::string& path,
const char* prefix)
{
std::string targetXml = cmExtraEclipseCDT4Generator::EscapeForXML(target);
fout <<
"<target name=\"" << prefix << target << "\""
"<target name=\"" << prefix << targetXml << "\""
" path=\"" << path.c_str() << "\""
" targetID=\"org.eclipse.cdt.make.MakeTargetBuilder\">\n"
"<buildCommand>"
<< cmExtraEclipseCDT4Generator::GetEclipsePath(make)
<< "</buildCommand>\n"
"<buildArguments>" << makeArgs << "</buildArguments>\n"
"<buildTarget>" << target << "</buildTarget>\n"
"<buildTarget>" << targetXml << "</buildTarget>\n"
"<stopOnError>true</stopOnError>\n"
"<useDefaultCommand>false</useDefaultCommand>\n"
"</target>\n"