[PATCH] D46521: [llvm] cmake: resolve symlinks in LLVMConfig.cmake

Peter Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 8 08:29:45 PDT 2018


Lekensteyn added a comment.

> Gentoo also supports installing multiple versions (in /usr/lib/llvm/X), and I have never seen any problems close to what you're describing. We're just putting the appropriate bin/ directories in PATH, and CMake finds its files just fine (relatively to PATH). So why do you need a lot of symlink magic to achieve the same effect?

This is not about finding clang in PATH, but about `find_package(LLVM)` being able to locate the desired CMake configuration (LLVMConfig.cmake).
Looking at http://www.portagefilelist.de/site/query/listPackageFiles/?do&category=sys-devel&package=llvm&version=5.0.2#result shows that Gentoo installs `/usr/lib/llvm/5/lib64/cmake/llvm/LLVMConfig.cmake`.
This should not work with `find_package(LLVM)` based on the CMake documentation for `find_package`.

Could you check the test case at https://bugs.llvm.org/show_bug.cgi?id=37128#c7 (see also the extra test in comment 8?)


Repository:
  rL LLVM

https://reviews.llvm.org/D46521





More information about the llvm-commits mailing list