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

Method AppendToFoundProperty

Source/cmFindPackageCommand.cxx:2275–2304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2273}
2274
2275void 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
2306void cmFindPackageCommand::AppendSuccessInformation()
2307{

Callers 1

Calls 7

GetGlobalPropertyMethod · 0.80
assignMethod · 0.80
push_backMethod · 0.80
SetGlobalPropertyMethod · 0.80
to_stringMethod · 0.80
GetStateMethod · 0.45
IsEmptyMethod · 0.45

Tested by

no test coverage detected