| 200 | } |
| 201 | |
| 202 | void cmExtraEclipseCDT4Generator::CreateSourceProjectFile() |
| 203 | { |
| 204 | assert(this->HomeDirectory != this->HomeOutputDirectory); |
| 205 | |
| 206 | // set up the project name: <project>-Source@<baseSourcePathName> |
| 207 | auto const& lg = this->GlobalGenerator->GetLocalGenerators()[0]; |
| 208 | std::string name = cmExtraEclipseCDT4Generator::GenerateProjectName( |
| 209 | lg->GetProjectName(), "Source", |
| 210 | cmExtraEclipseCDT4Generator::GetPathBasename(this->HomeDirectory)); |
| 211 | |
| 212 | std::string const filename = this->HomeDirectory + "/.project"; |
| 213 | cmGeneratedFileStream fout(filename); |
| 214 | if (!fout) { |
| 215 | return; |
| 216 | } |
| 217 | |
| 218 | cmXMLWriter xml(fout); |
| 219 | xml.StartDocument("UTF-8"); |
| 220 | xml.StartElement("projectDescription"); |
| 221 | xml.Element("name", name); |
| 222 | xml.Element("comment", ""); |
| 223 | xml.Element("projects", ""); |
| 224 | xml.Element("buildSpec", ""); |
| 225 | xml.Element("natures", ""); |
| 226 | xml.StartElement("linkedResources"); |
| 227 | |
| 228 | if (this->SupportsVirtualFolders) { |
| 229 | this->CreateLinksToSubprojects(xml, this->HomeDirectory); |
| 230 | this->SrcLinkedResources.clear(); |
| 231 | } |
| 232 | |
| 233 | xml.EndElement(); // linkedResources |
| 234 | xml.EndElement(); // projectDescription |
| 235 | xml.EndDocument(); |
| 236 | } |
| 237 | |
| 238 | void cmExtraEclipseCDT4Generator::AddEnvVar(std::ostream& out, |
| 239 | char const* envVar, |
no test coverage detected