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

Method GetPchFileObject

Source/cmGeneratorTarget.cxx:3177–3202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3175}
3176
3177std::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
3204std::string cmGeneratorTarget::GetPchFile(std::string const& config,
3205 std::string const& language,

Callers 2

AddPchDependenciesMethod · 0.80
GetPchFileMethod · 0.80

Calls 7

GetPchSourceMethod · 0.95
GetObjectDirectoryMethod · 0.95
GetOrCreateSourceMethod · 0.80
SetSpecialSourceTypeMethod · 0.80
cmStrCatFunction · 0.70
insertMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected