| 3175 | } |
| 3176 | |
| 3177 | std::string cmGeneratorTarget::GetPchFileObject(std::string const& config, |
| 3178 | std::string const& language, |
| 3179 | std::string const& arch) |
| 3180 | { |
| 3181 | if (language != "C" && language != "CXX" && language != "OBJC" && |
| 3182 | language != "OBJCXX") { |
| 3183 | return std::string(); |
| 3184 | } |
| 3185 | auto const inserted = |
| 3186 | this->PchObjectFiles.insert(std::make_pair(language + config + arch, "")); |
| 3187 | if (inserted.second) { |
| 3188 | std::string const pchSource = this->GetPchSource(config, language, arch); |
| 3189 | if (pchSource.empty()) { |
| 3190 | return std::string(); |
| 3191 | } |
| 3192 | std::string& filename = inserted.first->second; |
| 3193 | |
| 3194 | auto* pchSf = this->Makefile->GetOrCreateSource( |
| 3195 | pchSource, false, cmSourceFileLocationKind::Known); |
| 3196 | pchSf->SetSpecialSourceType(cmSourceFile::SpecialSourceType::PchSource); |
| 3197 | pchSf->ResolveFullPath(); |
| 3198 | filename = cmStrCat(this->GetObjectDirectory(config), '/', |
| 3199 | this->GetObjectName(pchSf)); |
| 3200 | } |
| 3201 | return inserted.first->second; |
| 3202 | } |
| 3203 | |
| 3204 | std::string cmGeneratorTarget::GetPchFile(std::string const& config, |
| 3205 | std::string const& language, |
no test coverage detected