summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraEclipseCDT4Generator.cxx
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2011-02-12 20:54:02 (GMT)
committerAlex Neundorf <neundorf@kde.org>2011-02-12 20:54:02 (GMT)
commit8074bca93ca3774d3ce8ca9195f1f08d36d6e7bb (patch)
tree79f8adbea8c2bc8952f212cb7ea2b785a52b9ea4 /Source/cmExtraEclipseCDT4Generator.cxx
parentcb94587a88866f3278676ea011c78e1c9d3663ec (diff)
downloadCMake-8074bca93ca3774d3ce8ca9195f1f08d36d6e7bb.zip
CMake-8074bca93ca3774d3ce8ca9195f1f08d36d6e7bb.tar.gz
CMake-8074bca93ca3774d3ce8ca9195f1f08d36d6e7bb.tar.bz2
Fix XML escaping for target names in Eclipse project files (#11658)
Alex
Diffstat (limited to 'Source/cmExtraEclipseCDT4Generator.cxx')
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 4cd052a..cd22291 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -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"