MCPcopy Create free account
hub / github.com/Kitware/CMake / CreateProjectsByProjectMaps

Method CreateProjectsByProjectMaps

Source/cmExtraCodeLiteGenerator.cxx:156–180  ·  view source on GitHub ↗

The "older way of doing it.

Source from the content-addressed store, hash-verified

154
155// The "older way of doing it.
156std::vector<std::string> cmExtraCodeLiteGenerator::CreateProjectsByProjectMaps(
157 cmXMLWriter* xml)
158{
159 std::vector<std::string> retval;
160 // for each sub project in the workspace create a codelite project
161 for (auto const& it : this->GlobalGenerator->GetProjectMap()) {
162
163 std::string const& outputDir = it.second[0]->GetCurrentBinaryDirectory();
164 std::string projectName = it.second[0]->GetProjectName();
165 retval.push_back(projectName);
166 std::string filename = cmStrCat(outputDir, '/', projectName, ".project");
167
168 // Make the project file relative to the workspace
169 filename = cmSystemTools::RelativePath(this->WorkspacePath, filename);
170
171 // create a project file
172 this->CreateProjectFile(it.second);
173 xml->StartElement("Project");
174 xml->Attribute("Name", projectName);
175 xml->Attribute("Path", filename);
176 xml->Attribute("Active", "No");
177 xml->EndElement();
178 }
179 return retval;
180}
181
182/* create the project file */
183void cmExtraCodeLiteGenerator::CreateProjectFile(

Callers 1

GenerateMethod · 0.95

Calls 7

CreateProjectFileMethod · 0.95
push_backMethod · 0.80
AttributeMethod · 0.80
cmStrCatFunction · 0.70
GetProjectNameMethod · 0.45
StartElementMethod · 0.45
EndElementMethod · 0.45

Tested by

no test coverage detected