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

Method AddPathToFileSet

Source/cmTarget.cxx:2296–2324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2294
2295template <typename ValueType>
2296void cmTargetInternals::AddPathToFileSet(cmTarget* self,
2297 std::string const& fileSetName,
2298 ValueType value,
2299 cm::string_view fileSetType,
2300 cm::string_view description,
2301 FileSetType::Action action)
2302{
2303 auto* fileSet = self->GetFileSet(fileSetName);
2304 if (!fileSet) {
2305 this->Makefile->IssueMessage(
2306 MessageType::FATAL_ERROR,
2307 cmStrCat(description, "has not yet been created."));
2308 return;
2309 }
2310 if (fileSet->GetType() != fileSetType) {
2311 this->Makefile->IssueMessage(MessageType::FATAL_ERROR,
2312 cmStrCat("File set \"", fileSetName,
2313 "\" is not of type \"", fileSetType,
2314 "\"."));
2315 return;
2316 }
2317 if (action == FileSetType::Action::Set) {
2318 fileSet->ClearFileEntries();
2319 }
2320 if (cmNonempty(value)) {
2321 fileSet->AddFileEntry(
2322 BT<std::string>(value, this->Makefile->GetBacktrace()));
2323 }
2324}
2325
2326cmValue cmTargetInternals::GetFileSetDirectories(
2327 cmTarget const* self, std::string const& fileSetName,

Callers 1

WritePropertiesMethod · 0.80

Calls 8

cmNonemptyFunction · 0.85
ClearFileEntriesMethod · 0.80
AddFileEntryMethod · 0.80
cmStrCatFunction · 0.70
GetFileSetMethod · 0.45
IssueMessageMethod · 0.45
GetTypeMethod · 0.45
GetBacktraceMethod · 0.45

Tested by

no test coverage detected