[Cmake-commits] CMake branch, next, updated. v2.8.7-2673-gf131113
Alexander Neundorf
neundorf at kde.org
Fri Feb 17 05:47:53 EST 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via f131113d11ca69ec71f090b402fbd04a38e14c41 (commit)
via fd866f01d484c14b57eb3c2619a06142d6ac85df (commit)
via d46bce95aa3bba22f921906bf74afacc3b6251c9 (commit)
via 2a48331e5d1ba855429b8c35e832143f18764e1b (commit)
via d03606a19cc05872baf23269ae8ec61d2e0719e8 (commit)
from ffdef8726313f88bcfc534f37a989db8c5b93c47 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f131113d11ca69ec71f090b402fbd04a38e14c41
commit f131113d11ca69ec71f090b402fbd04a38e14c41
Merge: ffdef87 fd866f0
Author: Alexander Neundorf <neundorf at kde.org>
AuthorDate: Fri Feb 17 05:47:48 2012 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Feb 17 05:47:48 2012 -0500
Merge topic 'FindPackage_ImprovedErrorMessages' into next
fd866f0 find_package: print the error message if an invalid CONFIGS name is used
d46bce9 find_package(): improved error message, mention version number
2a48331 find_package(): improved error message mentioning CMAKE_PREFIX_PATH
d03606a KWSys Nightly Date Stamp
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fd866f01d484c14b57eb3c2619a06142d6ac85df
commit fd866f01d484c14b57eb3c2619a06142d6ac85df
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Fri Feb 17 11:43:27 2012 +0100
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Fri Feb 17 11:45:24 2012 +0100
find_package: print the error message if an invalid CONFIGS name is used
Alex
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index c3e472b..a166f89 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -538,6 +538,7 @@ bool cmFindPackageCommand
e << "given CONFIGS option followed by invalid file name \""
<< args[i] << "\". The names given must be file names without "
<< "a path and with a \".cmake\" extension.";
+ this->SetError(e.str().c_str());
return false;
}
this->Configs.push_back(args[i]);
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d46bce95aa3bba22f921906bf74afacc3b6251c9
commit d46bce95aa3bba22f921906bf74afacc3b6251c9
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Fri Feb 17 11:37:29 2012 +0100
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Fri Feb 17 11:45:18 2012 +0100
find_package(): improved error message, mention version number
Now when Find-module or the config file have not been found at all,
the required version is printed too, so the user knows which version
of the package he has to install:
CMake Error at CMakeLists.txt:7 (find_package):
Could not find a configuration file for package ecm
(requested version 0.0.4) with one of the following names:
ecmConfig.cmake
ecm-config.cmake
To find the configuration file, set CMAKE_PREFIX_PATH to the installation
prefix of ecm, or set ecm_DIR to the
directory containing a CMake configuration file for ecm.
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 4fcb4e7..c3e472b 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -911,6 +911,14 @@ bool cmFindPackageCommand::HandlePackageMode()
}
else
{
+ std::string requestedVersionString;
+ if(!this->Version.empty())
+ {
+ requestedVersionString = " (requested version ";
+ requestedVersionString += this->Version;
+ requestedVersionString += ")";
+ }
+
e << "Could not find ";
if(!this->NoModule)
{
@@ -919,11 +927,12 @@ bool cmFindPackageCommand::HandlePackageMode()
if(this->Configs.size() == 1)
{
e << "a configuration file named " << this->Configs[0]
- << " for package " << this->Name << ".\n";
+ << " for package " << this->Name << requestedVersionString << ".\n";
}
else
{
e << "a configuration file for package " << this->Name
+ << requestedVersionString
<< " with one of the following names:\n";
for(std::vector<std::string>::const_iterator ci=this->Configs.begin();
ci != this->Configs.end(); ++ci)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a48331e5d1ba855429b8c35e832143f18764e1b
commit 2a48331e5d1ba855429b8c35e832143f18764e1b
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Fri Feb 17 11:26:03 2012 +0100
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Fri Feb 17 11:26:03 2012 +0100
find_package(): improved error message mentioning CMAKE_PREFIX_PATH
Now CMAKE_PREFIX_PATH is mentioned for searching the config files.
Also the possible names of the config files are now closer to the top.
Before it said:
CMake Error at CMakeLists.txt:4 (find_package):
Could not find module Findecm.cmake or a configuration file
for package ecm.
Adjust CMAKE_MODULE_PATH to find Findecm.cmake or set
ecm_DIR to the directory containing a CMake configuration
file for ecm. The file will have one of the following
names:
ecmConfig.cmake
ecm-config.cmake
Now it says:
CMake Error at CMakeLists.txt:7 (find_package):
Could not find module Findecm.cmake or a configuration file
for package ecm with one of the following names:
ecmConfig.cmake
ecm-config.cmake
Adjust CMAKE_MODULE_PATH to find Findecm.cmake. To find
the configuration file, set CMAKE_PREFIX_PATH to the installation prefix of
ecm, or set ecm_DIR to the directory
containing a CMake configuration file for ecm.
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 22bb628..4fcb4e7 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -916,31 +916,31 @@ bool cmFindPackageCommand::HandlePackageMode()
{
e << "module Find" << this->Name << ".cmake or ";
}
- e << "a configuration file for package " << this->Name << ".\n";
- if(!this->NoModule)
- {
- e << "Adjust CMAKE_MODULE_PATH to find Find"
- << this->Name << ".cmake or set ";
- }
- else
- {
- e << "Set ";
- }
- e << this->Variable << " to the directory containing a CMake "
- << "configuration file for " << this->Name << ". ";
if(this->Configs.size() == 1)
{
- e << "The file will be called " << this->Configs[0];
+ e << "a configuration file named " << this->Configs[0]
+ << " for package " << this->Name << ".\n";
}
else
{
- e << "The file will have one of the following names:\n";
+ e << "a configuration file for package " << this->Name
+ << " with one of the following names:\n";
for(std::vector<std::string>::const_iterator ci=this->Configs.begin();
ci != this->Configs.end(); ++ci)
{
e << " " << *ci << "\n";
}
}
+
+ if(!this->NoModule)
+ {
+ e << "Adjust CMAKE_MODULE_PATH to find Find"
+ << this->Name << ".cmake. ";
+ }
+ e << "To find the configuration file, set CMAKE_PREFIX_PATH to the "
+ << "installation prefix of " << this->Name
+ << ", or set " << this->Variable << " to the directory containing a "
+ << "CMake configuration file for " << this->Name << ". ";
}
-----------------------------------------------------------------------
Summary of changes:
Source/cmFindPackageCommand.cxx | 38 +++++++++++++++++++++++-------------
Source/kwsys/kwsysDateStamp.cmake | 2 +-
2 files changed, 25 insertions(+), 15 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list