diff options
Diffstat (limited to 'cmake/modules/LLVMConfigVersion.cmake.in')
-rw-r--r-- | cmake/modules/LLVMConfigVersion.cmake.in | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cmake/modules/LLVMConfigVersion.cmake.in b/cmake/modules/LLVMConfigVersion.cmake.in index add5aa9..e9ac4ed 100644 --- a/cmake/modules/LLVMConfigVersion.cmake.in +++ b/cmake/modules/LLVMConfigVersion.cmake.in @@ -1 +1,13 @@ -set(PACKAGE_VERSION "@PACKAGE_VERSION@")
\ No newline at end of file +set(PACKAGE_VERSION "@PACKAGE_VERSION@") + +# LLVM is API-compatible only with matching major.minor versions +# and patch versions not less than that requested. +if("@LLVM_VERSION_MAJOR@.@LLVM_VERSION_MINOR@" VERSION_EQUAL + "${PACKAGE_FIND_VERSION_MAJOR}.${PACKAGE_FIND_VERSION_MINOR}" + AND NOT "@LLVM_VERSION_PATCH@" VERSION_LESS "${PACKAGE_FIND_VERSION_PATCH}") + set(PACKAGE_VERSION_COMPATIBLE 1) + if("@LLVM_VERSION_PATCH@" VERSION_EQUAL + "${PACKAGE_FIND_VERSION_PATCH}") + set(PACKAGE_VERSION_EXACT 1) + endif() +endif() |