when writing the eclipse project files Alex
This commit is contained in:
parent
ef3e48c3d5
commit
cf0ab29fcb
|
@ -573,7 +573,8 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
|
||||||
{
|
{
|
||||||
emmited.insert(def);
|
emmited.insert(def);
|
||||||
fout << "<pathentry kind=\"mac\" name=\"" << def
|
fout << "<pathentry kind=\"mac\" name=\"" << def
|
||||||
<< "\" path=\"\" value=\"" << val << "\"/>\n";
|
<< "\" path=\"\" value=\"" << this->EscapeForXML(val)
|
||||||
|
<< "\"/>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -792,6 +793,19 @@ cmExtraEclipseCDT4Generator::GenerateProjectName(const std::string& name,
|
||||||
return name + (type.empty() ? "" : "-") + type + "@" + path;
|
return name + (type.empty() ? "" : "-") + type + "@" + path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string cmExtraEclipseCDT4Generator::EscapeForXML(const std::string& value)
|
||||||
|
{
|
||||||
|
std::string str = value;
|
||||||
|
cmSystemTools::ReplaceString(str, "&", "&");
|
||||||
|
cmSystemTools::ReplaceString(str, "<", "<");
|
||||||
|
cmSystemTools::ReplaceString(str, ">", ">");
|
||||||
|
cmSystemTools::ReplaceString(str, "\"", """);
|
||||||
|
// NOTE: This one is not necessary, since as of Eclipse CDT4 it will
|
||||||
|
// automatically change this to the original value (').
|
||||||
|
//cmSystemTools::ReplaceString(str, "'", "'");
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// Helper functions
|
// Helper functions
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
|
@ -84,6 +84,8 @@ private:
|
||||||
const std::string& type,
|
const std::string& type,
|
||||||
const std::string& path);
|
const std::string& path);
|
||||||
|
|
||||||
|
static std::string EscapeForXML(const std::string& value);
|
||||||
|
|
||||||
// Helper functions
|
// Helper functions
|
||||||
static void AppendStorageScanners(cmGeneratedFileStream& fout);
|
static void AppendStorageScanners(cmGeneratedFileStream& fout);
|
||||||
static void AppendTarget (cmGeneratedFileStream& fout,
|
static void AppendTarget (cmGeneratedFileStream& fout,
|
||||||
|
|
Loading…
Reference in New Issue