[PATCH] D138274: Add version to all LLVM cmake package
Mariusz Ceier via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 24 12:59:49 PST 2022
mceier added inline comments.
================
Comment at: clang/cmake/modules/ClangConfig.cmake.in:6
+set(LLVM_VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH})
+find_package(LLVM @LLVM_VERSION@ EXACT REQUIRED CONFIG
HINTS "@CLANG_CONFIG_LLVM_CMAKE_DIR@")
----------------
I think instead of `@LLVM_VERSION@` it should be `${LLVM_VERSION}` since `@LLVM_VERSION@` can be something like `16.0.0gitfce7a7aa` when LLVM_VERSION_SUFFIX is set and that value is incorrect according to cmake find_package:
> find_package called with invalid argument "16.0.0gitfce7a7aa"
This error message is produced by cmake when configuring standalone build of lldb:
> CMake Error at /usr/lib/llvm/16/lib64/cmake/clang/ClangConfig.cmake:10 (find_package):
> find_package called with invalid argument "16.0.0gitfce7a7aa"
> Call Stack (most recent call first):
> cmake/modules/LLDBStandalone.cmake:10 (find_package)
> CMakeLists.txt:30 (include)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138274/new/
https://reviews.llvm.org/D138274
More information about the cfe-commits
mailing list