From 75f8d5aab7b94987f6da2584e70c87b00b9bce7b Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 3 Oct 2008 10:39:53 -0400 Subject: [PATCH] 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. --- Source/cmFindPackageCommand.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 1594fcf57..b1c989d0a 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