MCPcopy Index your code
hub / github.com/Kitware/CMake / CreateXCodeBuildFileFromPath

Method CreateXCodeBuildFileFromPath

Source/cmGlobalXCodeGenerator.cxx:1000–1022  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

998}
999
1000cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeBuildFileFromPath(
1001 std::string const& fullpath, cmGeneratorTarget* target,
1002 std::string const& lang, cmSourceFile* sf)
1003{
1004 // Using a map and the full path guarantees that we will always get the same
1005 // fileRef object for any given full path. Same goes for the buildFile
1006 // object.
1007 cmXCodeObject* fileRef =
1008 this->CreateXCodeFileReferenceFromPath(fullpath, target, lang, sf);
1009 if (fileRef) {
1010 auto it = this->FileRefToBuildFileMap.find(fileRef);
1011 if (it == this->FileRefToBuildFileMap.end()) {
1012 cmXCodeObject* buildFile =
1013 this->CreateObject(cmXCodeObject::PBXBuildFile);
1014 buildFile->SetComment(fileRef->GetComment());
1015 buildFile->AddAttribute("fileRef", this->CreateObjectReference(fileRef));
1016 this->FileRefToBuildFileMap[fileRef] = buildFile;
1017 return buildFile;
1018 }
1019 return it->second;
1020 }
1021 return nullptr;
1022}
1023
1024class XCodeGeneratorExpressionInterpreter
1025 : public cmGeneratorExpressionInterpreter

Callers 2

CreateXCodeSourceFileMethod · 0.95

Calls 8

CreateObjectMethod · 0.95
CreateObjectReferenceMethod · 0.95
findMethod · 0.45
endMethod · 0.45
SetCommentMethod · 0.45
GetCommentMethod · 0.45
AddAttributeMethod · 0.45

Tested by

no test coverage detected