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

Method WriteDebug

Source/cmFindBase.cxx:678–732  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

676}
677
678void cmFindBaseDebugState::WriteDebug() const
679{
680 // clang-format off
681 auto buffer =
682 cmStrCat(
683 this->CommandName, " called with the following settings:"
684 "\n VAR: ", this->FindBaseCommand->VariableName,
685 "\n NAMES: ", cmWrap('"', this->FindBaseCommand->Names, '"', "\n "),
686 "\n Documentation: ", this->FindBaseCommand->VariableDocumentation,
687 "\n Framework"
688 "\n Only Search Frameworks: ", this->FindBaseCommand->SearchFrameworkOnly,
689 "\n Search Frameworks Last: ", this->FindBaseCommand->SearchFrameworkLast,
690 "\n Search Frameworks First: ", this->FindBaseCommand->SearchFrameworkFirst,
691 "\n AppBundle"
692 "\n Only Search AppBundle: ", this->FindBaseCommand->SearchAppBundleOnly,
693 "\n Search AppBundle Last: ", this->FindBaseCommand->SearchAppBundleLast,
694 "\n Search AppBundle First: ", this->FindBaseCommand->SearchAppBundleFirst,
695 '\n'
696 );
697 // clang-format on
698
699 if (this->FindCommand->NoDefaultPath) {
700 buffer += " NO_DEFAULT_PATH Enabled\n";
701 } else {
702 // clang-format off
703 buffer += cmStrCat(
704 " CMAKE_FIND_USE_CMAKE_PATH: ", !this->FindCommand->NoCMakePath,
705 "\n CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: ", !this->FindCommand->NoCMakeEnvironmentPath,
706 "\n CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: ", !this->FindCommand->NoSystemEnvironmentPath,
707 "\n CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: ", !this->FindCommand->NoCMakeSystemPath,
708 "\n CMAKE_FIND_USE_INSTALL_PREFIX: ", !this->FindCommand->NoCMakeInstallPath,
709 '\n'
710 );
711 // clang-format on
712 }
713
714 buffer +=
715 cmStrCat(this->CommandName, " considered the following locations:\n");
716 for (auto const& state : this->FailedSearchLocations) {
717 std::string path = cmStrCat(" ", state.path);
718 if (!state.regexName.empty()) {
719 path = cmStrCat(path, '/', state.regexName);
720 }
721 buffer += cmStrCat(path, '\n');
722 }
723
724 if (this->HasBeenFound()) {
725 buffer += cmStrCat("The item was found at\n ",
726 this->FoundSearchLocation.path, '\n');
727 } else {
728 buffer += "The item was not found.\n";
729 }
730
731 this->FindCommand->DebugMessage(buffer);
732}
733
734#ifndef CMAKE_BOOTSTRAP
735void cmFindBaseDebugState::WriteEvent(cmConfigureLog& log,

Callers 1

WriteMethod · 0.45

Calls 5

cmWrapFunction · 0.85
HasBeenFoundMethod · 0.80
DebugMessageMethod · 0.80
cmStrCatFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected