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

Method AddTargetObject

Source/cmMakefile.cxx:3138–3153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3136}
3137
3138void cmMakefile::AddTargetObject(std::string const& tgtName,
3139 std::string const& objFile)
3140{
3141 cmSourceFile* sf =
3142 this->GetOrCreateSource(objFile, true, cmSourceFileLocationKind::Known);
3143 sf->SetSpecialSourceType(cmSourceFile::SpecialSourceType::Object);
3144 sf->SetObjectLibrary(tgtName);
3145 sf->SetProperty("EXTERNAL_OBJECT", "1");
3146 // TODO: Compute a language for this object based on the associated source
3147 // file that compiles to it. Needs a policy as it likely affects link
3148 // language selection if done unconditionally.
3149#if !defined(CMAKE_BOOTSTRAP)
3150 this->SourceGroups[this->ObjectLibrariesSourceGroupIndex]->AddGroupFile(
3151 sf->ResolveFullPath());
3152#endif
3153}
3154
3155void cmMakefile::EnableLanguage(std::vector<std::string> const& languages,
3156 bool optional)

Callers 1

EvaluateMethod · 0.80

Calls 5

GetOrCreateSourceMethod · 0.95
SetSpecialSourceTypeMethod · 0.80
SetObjectLibraryMethod · 0.80
AddGroupFileMethod · 0.80
SetPropertyMethod · 0.45

Tested by

no test coverage detected