| 2504 | } |
| 2505 | |
| 2506 | void cmFindPackageCommand::FillPrefixesCMakeEnvironment() |
| 2507 | { |
| 2508 | cmSearchPath& paths = this->LabeledPaths[PathLabel::CMakeEnvironment]; |
| 2509 | std::string debugBuffer; |
| 2510 | std::size_t debugOffset = 0; |
| 2511 | |
| 2512 | // Check the environment variable with the same name as the cache |
| 2513 | // entry. |
| 2514 | paths.AddEnvPath(this->Variable); |
| 2515 | if (this->DebugModeEnabled()) { |
| 2516 | debugBuffer = cmStrCat("Env variable ", this->Variable, |
| 2517 | " [CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH].\n"); |
| 2518 | debugOffset = collectPathsForDebug(debugBuffer, paths); |
| 2519 | } |
| 2520 | |
| 2521 | // And now the general CMake environment variables |
| 2522 | paths.AddEnvPath("CMAKE_PREFIX_PATH"); |
| 2523 | if (this->DebugModeEnabled()) { |
| 2524 | debugBuffer = cmStrCat(debugBuffer, |
| 2525 | "CMAKE_PREFIX_PATH env variable " |
| 2526 | "[CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH].\n"); |
| 2527 | debugOffset = collectPathsForDebug(debugBuffer, paths, debugOffset); |
| 2528 | } |
| 2529 | |
| 2530 | paths.AddEnvPath("CMAKE_FRAMEWORK_PATH"); |
| 2531 | paths.AddEnvPath("CMAKE_APPBUNDLE_PATH"); |
| 2532 | if (this->DebugModeEnabled()) { |
| 2533 | debugBuffer = |
| 2534 | cmStrCat(debugBuffer, |
| 2535 | "CMAKE_FRAMEWORK_PATH and CMAKE_APPBUNDLE_PATH env " |
| 2536 | "variables [CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH].\n"); |
| 2537 | collectPathsForDebug(debugBuffer, paths, debugOffset); |
| 2538 | this->DebugBuffer = cmStrCat(this->DebugBuffer, debugBuffer); |
| 2539 | } |
| 2540 | } |
| 2541 | |
| 2542 | void cmFindPackageCommand::FillPrefixesCMakeVariable() |
| 2543 | { |
no test coverage detected