summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-02-10 19:07:41 (GMT)
committerBrad King <brad.king@kitware.com>2022-02-10 21:30:09 (GMT)
commitdf3e29450a1d9d5bd18423831fdab13ba94fe876 (patch)
tree6ca3e05df325573a210a3a25d080d4d585ba066d
parent636ca7f25c3016805bf0214bc563f30728d9de0b (diff)
downloadCMake-df3e29450a1d9d5bd18423831fdab13ba94fe876.zip
CMake-df3e29450a1d9d5bd18423831fdab13ba94fe876.tar.gz
CMake-df3e29450a1d9d5bd18423831fdab13ba94fe876.tar.bz2
find_package: Mention package name in Config mode debug output
Otherwise, if there are no paths considered then the output does not specify the name of the package.
-rw-r--r--Source/cmFindPackageCommand.cxx3
-rw-r--r--Tests/RunCMake/CMakePresets/Debug-stderr.txt3
-rw-r--r--Tests/RunCMake/find_package/FromPATHEnv-stderr.txt3
-rw-r--r--Tests/RunCMake/find_package/FromPATHEnvDebugPkg-stderr.txt3
4 files changed, 8 insertions, 4 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 5f1544d..7bcb719 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -1117,7 +1117,8 @@ bool cmFindPackageCommand::FindConfig()
if (this->DebugMode) {
this->DebugBuffer = cmStrCat(this->DebugBuffer,
"find_package considered the following "
- "locations for the Config module:\n");
+ "locations for ",
+ this->Name, "'s Config module:\n");
}
// Search for frameworks.
diff --git a/Tests/RunCMake/CMakePresets/Debug-stderr.txt b/Tests/RunCMake/CMakePresets/Debug-stderr.txt
index 7fdb8b3..d30dc58 100644
--- a/Tests/RunCMake/CMakePresets/Debug-stderr.txt
+++ b/Tests/RunCMake/CMakePresets/Debug-stderr.txt
@@ -1 +1,2 @@
- find_package considered the following locations for the Config module:
+ find_package considered the following locations for
+ ThisPackageHopefullyDoesNotExist's Config module:
diff --git a/Tests/RunCMake/find_package/FromPATHEnv-stderr.txt b/Tests/RunCMake/find_package/FromPATHEnv-stderr.txt
index 5fe89fd..19108f4 100644
--- a/Tests/RunCMake/find_package/FromPATHEnv-stderr.txt
+++ b/Tests/RunCMake/find_package/FromPATHEnv-stderr.txt
@@ -65,7 +65,8 @@
none
- find_package considered the following locations for the Config module:
+ find_package considered the following locations for Resolved's Config
+ module:
[^
]*/Tests/RunCMake/find_package/PackageRoot/ResolvedConfig.cmake
diff --git a/Tests/RunCMake/find_package/FromPATHEnvDebugPkg-stderr.txt b/Tests/RunCMake/find_package/FromPATHEnvDebugPkg-stderr.txt
index f921804..a708282 100644
--- a/Tests/RunCMake/find_package/FromPATHEnvDebugPkg-stderr.txt
+++ b/Tests/RunCMake/find_package/FromPATHEnvDebugPkg-stderr.txt
@@ -65,7 +65,8 @@
none
- find_package considered the following locations for the Config module:
+ find_package considered the following locations for Resolved's Config
+ module:
[^
]*/Tests/RunCMake/find_package/PackageRoot/ResolvedConfig.cmake