forked from OSchip/llvm-project
f103c0d7fd
Include a path hint for find_package() in ClangConfig.cmake to ensure that CMake prefers LLVM installed alongside clang over the default search path. If two versions of LLVM are installed in the system, and one of them is in PATH, CMake's find_package() magic prefers the CMake directory alongside that install by default. Adding a relative hint makes it possible to prioritize to the install from which find_package() is called. If you want to build e.g. LLDB against another install of LLVM, you can pass LLVM_CONFIG override. In this case, LLDB queries the prefix from llvm-config and uses the CMake files located there. However, when including ClangConfig, the implicit find_package() nevertheless prefers PATH-found LLVM over the one used previously by LLDB, and two versions of LLVMConfig end up being loaded. This could be fixed on LLDB end up by explicitly forcing custom package search location. However, it seems simpler and safer to add a hint to ClangConfig than to track every usage of ClangConfig. Differential Revision: https://reviews.llvm.org/D29304 llvm-svn: 293632 |
||
---|---|---|
.. | ||
AddClang.cmake | ||
CMakeLists.txt | ||
ClangConfig.cmake.in |