summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-02-10 18:41:23 (GMT)
committerBrad King <brad.king@kitware.com>2022-02-10 21:30:09 (GMT)
commit636ca7f25c3016805bf0214bc563f30728d9de0b (patch)
tree9833b159f0aca91016bd99d8281649a816dc5f60 /Source/cmFindPackageCommand.cxx
parent596e18540988a7c6a426c5997d0008444773fc02 (diff)
downloadCMake-636ca7f25c3016805bf0214bc563f30728d9de0b.zip
CMake-636ca7f25c3016805bf0214bc563f30728d9de0b.tar.gz
CMake-636ca7f25c3016805bf0214bc563f30728d9de0b.tar.bz2
find_package: Fix find module name in --debug-find output
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r--Source/cmFindPackageCommand.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index d29201b..5f1544d 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -789,14 +789,13 @@ void cmFindPackageCommand::RestoreFindDefinitions()
bool cmFindPackageCommand::FindModule(bool& found)
{
- std::string module = cmStrCat("Find", this->Name, ".cmake");
+ std::string moduleFileName = cmStrCat("Find", this->Name, ".cmake");
bool system = false;
- std::string debugBuffer =
- cmStrCat("find_package considered the following paths for ", this->Name,
- ".cmake\n");
+ std::string debugBuffer = cmStrCat(
+ "find_package considered the following paths for ", moduleFileName, ":\n");
std::string mfile = this->Makefile->GetModulesFile(
- module, system, this->DebugMode, debugBuffer);
+ moduleFileName, system, this->DebugMode, debugBuffer);
if (this->DebugMode) {
if (mfile.empty()) {
debugBuffer = cmStrCat(debugBuffer, "The file was not found.\n");