summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-10-03 14:39:53 (GMT)
committerBrad King <brad.king@kitware.com>2008-10-03 14:39:53 (GMT)
commit75f8d5aab7b94987f6da2584e70c87b00b9bce7b (patch)
treeff969e3935db82e81209330e137f07510cb483e2
parent7f819903ed014b9ebd5c931d394d51ae7c0de1a0 (diff)
downloadCMake-75f8d5aab7b94987f6da2584e70c87b00b9bce7b.zip
CMake-75f8d5aab7b94987f6da2584e70c87b00b9bce7b.tar.gz
CMake-75f8d5aab7b94987f6da2584e70c87b00b9bce7b.tar.bz2
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.
-rw-r--r--Source/cmFindPackageCommand.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 1594fcf..b1c989d 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -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