[Cmake-commits] CMake branch, next, updated. v2.8.2-627-g77416b1
Alexander Neundorf
neundorf at kde.org
Tue Aug 31 15:13:07 EDT 2010
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 77416b1f4fd8d80b3701e3b079bfdb0e5988fc00 (commit)
via 5cdfc9c8ea675658c14d21848917f0e2d9ab93da (commit)
from c4a8aac30494769bf615bb07ad651e9aa4a53b15 (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=77416b1f4fd8d80b3701e3b079bfdb0e5988fc00
commit 77416b1f4fd8d80b3701e3b079bfdb0e5988fc00
Merge: c4a8aac 5cdfc9c
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Tue Aug 31 21:11:38 2010 +0200
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Tue Aug 31 21:11:38 2010 +0200
Merge branch 'ImproveFindPackageConfigMode' into next
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5cdfc9c8ea675658c14d21848917f0e2d9ab93da
commit 5cdfc9c8ea675658c14d21848917f0e2d9ab93da
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Tue Aug 31 21:10:00 2010 +0200
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Tue Aug 31 21:10:00 2010 +0200
Improve wording of the error message of find_package() in config-mode
As suggested by Brad, this improves the wording of the error message
in config-mode when config-files were found, but no suitable version.
The patch also contains the small loop-optimization suggested by Brad.
Alex
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 8ee8fc7..55c7cb9 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -820,10 +820,12 @@ bool cmFindPackageCommand::HandlePackageMode()
// have been found, but they didn't have appropriate versions.
if (this->ConsideredConfigs.size() > 0)
{
- e << "Could not find configuration file for package " << this->Name
- << " with " << (this->VersionExact ? "exact " : "at least ")
- << "version " << this->Version << " .\n"
- << "Found the following files:\n";
+ e << "Could not find a configuration file for package \""
+ << this->Name << "\" that "
+ << (this->VersionExact? "exactly matches" : "is compatible with")
+ << " requested version \"" << this->Version << "\".\n"
+ << "The following configuration files were considered but not "
+ "accepted:\n";
for(std::vector<ConfigFileInfo>::size_type i=0;
i<this->ConsideredConfigs.size(); i++)
{
@@ -932,16 +934,15 @@ bool cmFindPackageCommand::HandlePackageMode()
std::string consideredConfigFiles;
std::string consideredVersions;
+ const char* sep = "";
for(std::vector<ConfigFileInfo>::size_type i=0;
i<this->ConsideredConfigs.size(); i++)
{
- if (i>0)
- {
- consideredConfigFiles += ";";
- consideredVersions += ";";
- }
+ consideredConfigFiles += sep;
+ consideredVersions += sep;
consideredConfigFiles += this->ConsideredConfigs[i].filename;
consideredVersions += this->ConsideredConfigs[i].version;
+ sep = ";";
}
this->Makefile->AddDefinition(consideredConfigsVar.c_str(),
-----------------------------------------------------------------------
Summary of changes:
Source/cmFindPackageCommand.cxx | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list