Fix XML escaping for target names in Eclipse project files (#11658)
Alex
This commit is contained in:
parent
cb94587a88
commit
8074bca93c
|
@ -1001,15 +1001,16 @@ void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout,
|
||||||
const std::string& path,
|
const std::string& path,
|
||||||
const char* prefix)
|
const char* prefix)
|
||||||
{
|
{
|
||||||
|
std::string targetXml = cmExtraEclipseCDT4Generator::EscapeForXML(target);
|
||||||
fout <<
|
fout <<
|
||||||
"<target name=\"" << prefix << target << "\""
|
"<target name=\"" << prefix << targetXml << "\""
|
||||||
" path=\"" << path.c_str() << "\""
|
" path=\"" << path.c_str() << "\""
|
||||||
" targetID=\"org.eclipse.cdt.make.MakeTargetBuilder\">\n"
|
" targetID=\"org.eclipse.cdt.make.MakeTargetBuilder\">\n"
|
||||||
"<buildCommand>"
|
"<buildCommand>"
|
||||||
<< cmExtraEclipseCDT4Generator::GetEclipsePath(make)
|
<< cmExtraEclipseCDT4Generator::GetEclipsePath(make)
|
||||||
<< "</buildCommand>\n"
|
<< "</buildCommand>\n"
|
||||||
"<buildArguments>" << makeArgs << "</buildArguments>\n"
|
"<buildArguments>" << makeArgs << "</buildArguments>\n"
|
||||||
"<buildTarget>" << target << "</buildTarget>\n"
|
"<buildTarget>" << targetXml << "</buildTarget>\n"
|
||||||
"<stopOnError>true</stopOnError>\n"
|
"<stopOnError>true</stopOnError>\n"
|
||||||
"<useDefaultCommand>false</useDefaultCommand>\n"
|
"<useDefaultCommand>false</useDefaultCommand>\n"
|
||||||
"</target>\n"
|
"</target>\n"
|
||||||
|
|
Loading…
Reference in New Issue