| 2294 | |
| 2295 | template <typename ValueType> |
| 2296 | void 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 | |
| 2326 | cmValue cmTargetInternals::GetFileSetDirectories( |
| 2327 | cmTarget const* self, std::string const& fileSetName, |
no test coverage detected