From 53d9d84f6b71be458dbe9c191177aa2b854985ea Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Fri, 21 Sep 2007 11:42:40 -0400 Subject: [PATCH] STYLE: improved error message for the case that neither FindFoo.cmake nor FooConfig.cmake were found Alex --- Source/cmFindPackageCommand.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 8e30cd4090..1f534a5047 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -222,9 +222,12 @@ bool cmFindPackageCommand::InitialPass(std::vector const& args) else if(!quiet || required) { cmOStringStream e; - e << this->Variable << " is not set. It must be set to the directory " - << "containing " << this->Config << " in order to use " - << this->Name << "."; + e << "FIND_PACKAGE could not find Find" << this->Name + << ".cmake nor config file " << this->Config << ".\n" + << "Adjust CMAKE_MODULE_PATH to find Find" << this->Name + << ".cmake or set " << this->Variable + << "\nto the directory containing " << this->Config + << " in order to use " << this->Name << "."; cmSystemTools::Error(e.str().c_str()); if(required) {