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

Method GetOrCreateFileSet

Source/cmTarget.cxx:3150–3164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3148}
3149
3150std::pair<cmFileSet*, bool> cmTarget::GetOrCreateFileSet(
3151 std::string const& name, std::string const& type, cmFileSetVisibility vis)
3152{
3153 auto result = this->impl->FileSets.emplace(
3154 name, cmFileSet(this->GetMakefile(), name, type, vis));
3155 if (result.second) {
3156 auto bt = this->impl->Makefile->GetBacktrace();
3157 if (type == this->impl->HeadersFileSets.TypeName) {
3158 this->impl->HeadersFileSets.AddFileSet(name, vis, std::move(bt));
3159 } else if (type == this->impl->CxxModulesFileSets.TypeName) {
3160 this->impl->CxxModulesFileSets.AddFileSet(name, vis, std::move(bt));
3161 }
3162 }
3163 return std::make_pair(&result.first->second, result.second);
3164}
3165
3166std::string cmTarget::GetFileSetsPropertyName(std::string const& type)
3167{

Callers 3

PopulateFileSetFunction · 0.80
HandleOneFileSetMethod · 0.80

Calls 6

GetMakefileMethod · 0.95
moveFunction · 0.85
emplaceMethod · 0.80
AddFileSetMethod · 0.80
cmFileSetClass · 0.70
GetBacktraceMethod · 0.45

Tested by

no test coverage detected