diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-09-13 14:32:32 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-09-23 10:52:25 (GMT) |
commit | 5b3356263cf8f00c79c25aa9e3ac71ffd8cc7e7e (patch) | |
tree | a219a6ba773248d05b8674c665addb9854593440 /Modules/BasicConfigVersion-SameMinorVersion.cmake.in | |
parent | 6bfc442fde18f5544d7e7333d12701050a765535 (diff) | |
download | CMake-5b3356263cf8f00c79c25aa9e3ac71ffd8cc7e7e.zip CMake-5b3356263cf8f00c79c25aa9e3ac71ffd8cc7e7e.tar.gz CMake-5b3356263cf8f00c79c25aa9e3ac71ffd8cc7e7e.tar.bz2 |
CMakePackageConfigHelpers: Add version range support
Diffstat (limited to 'Modules/BasicConfigVersion-SameMinorVersion.cmake.in')
-rw-r--r-- | Modules/BasicConfigVersion-SameMinorVersion.cmake.in | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/BasicConfigVersion-SameMinorVersion.cmake.in b/Modules/BasicConfigVersion-SameMinorVersion.cmake.in index e2030d2..bddf4ce 100644 --- a/Modules/BasicConfigVersion-SameMinorVersion.cmake.in +++ b/Modules/BasicConfigVersion-SameMinorVersion.cmake.in @@ -10,6 +10,13 @@ # The variable CVF_VERSION must be set before calling configure_file(). +if (PACKAGE_FIND_VERSION_RANGE) + message(AUTHOR_WARNING + "`find_package()` specify a version range but the version strategy " + "(SameMinorVersion) of the module `${PACKAGE_FIND_NAME}` is incompatible " + "with this request. Only the lower endpoint of the range will be used.") +endif() + set(PACKAGE_VERSION "@CVF_VERSION@") if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) |