| 998 | } |
| 999 | |
| 1000 | cmXCodeObject* 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 | |
| 1024 | class XCodeGeneratorExpressionInterpreter |
| 1025 | : public cmGeneratorExpressionInterpreter |
no test coverage detected