diff options
author | Brad King <brad.king@kitware.com> | 2008-10-03 14:39:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-10-03 14:39:53 (GMT) |
commit | 75f8d5aab7b94987f6da2584e70c87b00b9bce7b (patch) | |
tree | ff969e3935db82e81209330e137f07510cb483e2 /Source/cmFindPackageCommand.cxx | |
parent | 7f819903ed014b9ebd5c931d394d51ae7c0de1a0 (diff) | |
download | CMake-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.
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 8 |
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 |