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

Method FillPrefixesUserRegistry

Source/cmFindPackageCommand.cxx:2591–2619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2589}
2590
2591void cmFindPackageCommand::FillPrefixesUserRegistry()
2592{
2593#if defined(_WIN32) && !defined(__CYGWIN__)
2594 this->LoadPackageRegistryWinUser();
2595#elif defined(__HAIKU__)
2596 char dir[B_PATH_NAME_LENGTH];
2597 if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, dir, sizeof(dir)) ==
2598 B_OK) {
2599 std::string fname = cmStrCat(dir, "/cmake/packages/", Name);
2600 this->LoadPackageRegistryDir(fname,
2601 this->LabeledPaths[PathLabel::UserRegistry]);
2602 }
2603#else
2604 std::string dir;
2605 if (cmSystemTools::GetEnv("HOME", dir)) {
2606 dir += "/.cmake/packages/";
2607 dir += this->Name;
2608 this->LoadPackageRegistryDir(dir,
2609 this->LabeledPaths[PathLabel::UserRegistry]);
2610 }
2611#endif
2612 if (this->DebugModeEnabled()) {
2613 std::string debugBuffer =
2614 "CMake User Package Registry [CMAKE_FIND_USE_PACKAGE_REGISTRY].\n";
2615 collectPathsForDebug(debugBuffer,
2616 this->LabeledPaths[PathLabel::UserRegistry]);
2617 this->DebugBuffer = cmStrCat(this->DebugBuffer, debugBuffer);
2618 }
2619}
2620
2621void cmFindPackageCommand::FillPrefixesSystemRegistry()
2622{

Callers 1

ComputePrefixesMethod · 0.95

Calls 5

collectPathsForDebugFunction · 0.85
DebugModeEnabledMethod · 0.80
cmStrCatFunction · 0.70

Tested by

no test coverage detected