ENH: Warn and ignore EXACT without version

If the find_package command is invoked with the EXACT option but without
a version, warn and ignore the option.
This commit is contained in:
Brad King 2008-10-03 10:39:53 -04:00
parent 7f819903ed
commit 75f8d5aab7
1 changed files with 8 additions and 0 deletions

View File

@ -468,6 +468,14 @@ bool cmFindPackageCommand
}
}
// Ignore EXACT with no version.
if(this->Version.empty() && this->VersionExact)
{
this->VersionExact = false;
this->Makefile->IssueMessage(
cmake::AUTHOR_WARNING, "Ignoring EXACT since no version is requested.");
}
if(!this->Version.empty())
{
// Try to parse the version number and store the results that were