| 395 | } |
| 396 | |
| 397 | void cmExtraCodeLiteGenerator::CreateProjectSourceEntries( |
| 398 | std::map<std::string, cmSourceFile*>& cFiles, |
| 399 | std::set<std::string>& otherFiles, cmXMLWriter* _xml, |
| 400 | std::string const& projectPath, cmMakefile const* mf, |
| 401 | std::string const& projectType, std::string const& targetName) |
| 402 | { |
| 403 | cmXMLWriter& xml(*_xml); |
| 404 | this->FindMatchingHeaderfiles(cFiles, otherFiles); |
| 405 | // Create 2 virtual folders: src and include |
| 406 | // and place all the implementation files into the src |
| 407 | // folder, the rest goes to the include folder |
| 408 | xml.StartElement("VirtualDirectory"); |
| 409 | xml.Attribute("Name", "src"); |
| 410 | |
| 411 | // insert all source files in the codelite project |
| 412 | // first the C/C++ implementation files, then all others |
| 413 | this->CreateFoldersAndFiles(cFiles, xml, projectPath); |
| 414 | xml.EndElement(); // VirtualDirectory |
| 415 | |
| 416 | xml.StartElement("VirtualDirectory"); |
| 417 | xml.Attribute("Name", "include"); |
| 418 | this->CreateFoldersAndFiles(otherFiles, xml, projectPath); |
| 419 | xml.EndElement(); // VirtualDirectory |
| 420 | |
| 421 | // Get the number of CPUs. We use this information for the make -jN |
| 422 | // command |
| 423 | cmsys::SystemInformation info; |
| 424 | info.RunCPUCheck(); |
| 425 | |
| 426 | this->CpuCount = |
| 427 | info.GetNumberOfLogicalCPU() * info.GetNumberOfPhysicalCPU(); |
| 428 | |
| 429 | std::string codeliteCompilerName = this->GetCodeLiteCompilerName(mf); |
| 430 | |
| 431 | xml.StartElement("Settings"); |
| 432 | xml.Attribute("Type", projectType); |
| 433 | |
| 434 | xml.StartElement("Configuration"); |
| 435 | xml.Attribute("Name", this->ConfigName); |
| 436 | xml.Attribute("CompilerType", this->GetCodeLiteCompilerName(mf)); |
| 437 | xml.Attribute("DebuggerType", "GNU gdb debugger"); |
| 438 | xml.Attribute("Type", projectType); |
| 439 | xml.Attribute("BuildCmpWithGlobalSettings", "append"); |
| 440 | xml.Attribute("BuildLnkWithGlobalSettings", "append"); |
| 441 | xml.Attribute("BuildResWithGlobalSettings", "append"); |
| 442 | |
| 443 | xml.StartElement("Compiler"); |
| 444 | xml.Attribute("Options", "-g"); |
| 445 | xml.Attribute("Required", "yes"); |
| 446 | xml.Attribute("PreCompiledHeader", ""); |
| 447 | xml.StartElement("IncludePath"); |
| 448 | xml.Attribute("Value", "."); |
| 449 | xml.EndElement(); // IncludePath |
| 450 | xml.EndElement(); // Compiler |
| 451 | |
| 452 | xml.StartElement("Linker"); |
| 453 | xml.Attribute("Options", ""); |
| 454 | xml.Attribute("Required", "yes"); |
no test coverage detected