| 2273 | } |
| 2274 | |
| 2275 | void cmFindPackageCommand::AppendToFoundProperty(bool const found) |
| 2276 | { |
| 2277 | cmList foundContents; |
| 2278 | cmValue foundProp = |
| 2279 | this->Makefile->GetState()->GetGlobalProperty("PACKAGES_FOUND"); |
| 2280 | if (!foundProp.IsEmpty()) { |
| 2281 | foundContents.assign(*foundProp); |
| 2282 | foundContents.remove_items({ this->Name }); |
| 2283 | } |
| 2284 | |
| 2285 | cmList notFoundContents; |
| 2286 | cmValue notFoundProp = |
| 2287 | this->Makefile->GetState()->GetGlobalProperty("PACKAGES_NOT_FOUND"); |
| 2288 | if (!notFoundProp.IsEmpty()) { |
| 2289 | notFoundContents.assign(*notFoundProp); |
| 2290 | notFoundContents.remove_items({ this->Name }); |
| 2291 | } |
| 2292 | |
| 2293 | if (found) { |
| 2294 | foundContents.push_back(this->Name); |
| 2295 | } else { |
| 2296 | notFoundContents.push_back(this->Name); |
| 2297 | } |
| 2298 | |
| 2299 | this->Makefile->GetState()->SetGlobalProperty("PACKAGES_FOUND", |
| 2300 | foundContents.to_string()); |
| 2301 | |
| 2302 | this->Makefile->GetState()->SetGlobalProperty("PACKAGES_NOT_FOUND", |
| 2303 | notFoundContents.to_string()); |
| 2304 | } |
| 2305 | |
| 2306 | void cmFindPackageCommand::AppendSuccessInformation() |
| 2307 | { |
no test coverage detected