| 120 | } |
| 121 | |
| 122 | void cmLocalXCodeGenerator::ComputeObjectFilenames( |
| 123 | std::map<cmSourceFile const*, cmObjectLocations>& mapping, |
| 124 | std::string const& config, |
| 125 | cmGeneratorTarget const*) |
| 126 | { |
| 127 | // Count the number of object files with each name. Warn about duplicate |
| 128 | // names since Xcode names them uniquely automatically with a numeric suffix |
| 129 | // to avoid exact duplicate file names. Note that Mac file names are not |
| 130 | // typically case sensitive, hence the LowerCase. |
| 131 | std::map<std::string, int> counts; |
| 132 | for (auto& si : mapping) { |
| 133 | cmSourceFile const* sf = si.first; |
| 134 | std::string shortObjectName = this->GetShortObjectFileName(*sf); |
| 135 | std::string longObjectName = cmStrCat( |
| 136 | cmSystemTools::GetFilenameWithoutLastExtension(sf->GetFullPath()), ".o"); |
| 137 | |
| 138 | std::string longObjectNameLower = cmSystemTools::LowerCase(longObjectName); |
| 139 | counts[longObjectNameLower] += 1; |
| 140 | if (2 == counts[longObjectNameLower]) { |
| 141 | // TODO: emit warning about duplicate name? |
| 142 | } |
| 143 | si.second.ShortLoc.emplace(shortObjectName); |
| 144 | si.second.LongLoc.Update(longObjectName); |
| 145 | this->FillCustomInstallObjectLocations(*sf, config, ".o", si.second.InstallLongLoc); |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | void cmLocalXCodeGenerator::AddXCConfigSources(cmGeneratorTarget* target) |
| 150 | { |
nothing calls this directly
no test coverage detected