File tree Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -127,13 +127,11 @@ configure_file(
127
127
${CMAKE_CURRENT_BINARY_DIR} /CMakeFiles/LLVMConfig.cmake
128
128
@ONLY )
129
129
130
- # Generate LLVMConfigVersion.cmake for build tree (later copied to install tree).
131
- include (CMakePackageConfigHelpers )
132
- write_basic_package_version_file (
133
- "${llvm_cmake_builddir} /LLVMConfigVersion.cmake"
134
- VERSION "${PACKAGE_VERSION} "
135
- COMPATIBILITY SameMinorVersion
136
- )
130
+ # Generate LLVMConfigVersion.cmake for build and install tree.
131
+ configure_file (
132
+ LLVMConfigVersion.cmake.in
133
+ ${llvm_cmake_builddir} /LLVMConfigVersion.cmake
134
+ @ONLY )
137
135
138
136
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY )
139
137
get_property (llvm_has_exports GLOBAL PROPERTY LLVM_HAS_EXPORTS )
Original file line number Diff line number Diff line change
1
+ set (PACKAGE_VERSION "@PACKAGE_VERSION@" )
2
+
3
+ # LLVM is API-compatible only with matching major.minor versions
4
+ # and patch versions not less than that requested.
5
+ if ("@LLVM_VERSION_MAJOR@.@LLVM_VERSION_MINOR@" VERSION_EQUAL
6
+ "${PACKAGE_FIND_VERSION_MAJOR} .${PACKAGE_FIND_VERSION_MINOR} "
7
+ AND NOT "@LLVM_VERSION_PATCH@" VERSION_LESS "${PACKAGE_FIND_VERSION_PATCH} " )
8
+ set (PACKAGE_VERSION_COMPATIBLE 1 )
9
+ if ("@LLVM_VERSION_PATCH@" VERSION_EQUAL
10
+ "${PACKAGE_FIND_VERSION_PATCH} " )
11
+ set (PACKAGE_VERSION_EXACT 1 )
12
+ endif ()
13
+ endif ()
You can’t perform that action at this time.
0 commit comments