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

Method AddDirectoryToFileSet

Source/cmTarget.cxx:2265–2293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2263
2264template <typename ValueType>
2265void cmTargetInternals::AddDirectoryToFileSet(cmTarget* self,
2266 std::string const& fileSetName,
2267 ValueType value,
2268 cm::string_view fileSetType,
2269 cm::string_view description,
2270 FileSetType::Action action)
2271{
2272 auto* fileSet = self->GetFileSet(fileSetName);
2273 if (!fileSet) {
2274 this->Makefile->IssueMessage(
2275 MessageType::FATAL_ERROR,
2276 cmStrCat(description, "has not yet been created."));
2277 return;
2278 }
2279 if (fileSet->GetType() != fileSetType) {
2280 this->Makefile->IssueMessage(MessageType::FATAL_ERROR,
2281 cmStrCat("File set \"", fileSetName,
2282 "\" is not of type \"", fileSetType,
2283 "\"."));
2284 return;
2285 }
2286 if (action == FileSetType::Action::Set) {
2287 fileSet->ClearDirectoryEntries();
2288 }
2289 if (cmNonempty(value)) {
2290 fileSet->AddDirectoryEntry(
2291 BT<std::string>(value, this->Makefile->GetBacktrace()));
2292 }
2293}
2294
2295template <typename ValueType>
2296void cmTargetInternals::AddPathToFileSet(cmTarget* self,

Callers 1

WritePropertiesMethod · 0.80

Calls 8

cmNonemptyFunction · 0.85
ClearDirectoryEntriesMethod · 0.80
AddDirectoryEntryMethod · 0.80
cmStrCatFunction · 0.70
GetFileSetMethod · 0.45
IssueMessageMethod · 0.45
GetTypeMethod · 0.45
GetBacktraceMethod · 0.45

Tested by

no test coverage detected