| 2484 | } |
| 2485 | |
| 2486 | void cmFindPackageCommand::FillPrefixesPackageRoot() |
| 2487 | { |
| 2488 | cmSearchPath& paths = this->LabeledPaths[PathLabel::PackageRoot]; |
| 2489 | |
| 2490 | // Add the PACKAGE_ROOT_PATH from each enclosing find_package call. |
| 2491 | for (auto pkgPaths = this->Makefile->FindPackageRootPathStack.rbegin(); |
| 2492 | pkgPaths != this->Makefile->FindPackageRootPathStack.rend(); |
| 2493 | ++pkgPaths) { |
| 2494 | for (std::string const& path : *pkgPaths) { |
| 2495 | paths.AddPath(path); |
| 2496 | } |
| 2497 | } |
| 2498 | if (this->DebugModeEnabled()) { |
| 2499 | std::string debugBuffer = "<PackageName>_ROOT CMake variable " |
| 2500 | "[CMAKE_FIND_USE_PACKAGE_ROOT_PATH].\n"; |
| 2501 | collectPathsForDebug(debugBuffer, paths); |
| 2502 | this->DebugBuffer = cmStrCat(this->DebugBuffer, debugBuffer); |
| 2503 | } |
| 2504 | } |
| 2505 | |
| 2506 | void cmFindPackageCommand::FillPrefixesCMakeEnvironment() |
| 2507 | { |
no test coverage detected