[libcxx-commits] [PATCH] D62640: [CMake] Use find_package(LLVM) instead of LLVMConfig

Shoaib Meenai via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 29 23:41:39 PDT 2019


smeenai added inline comments.


================
Comment at: llvm/runtimes/CMakeLists.txt:62
 
+  find_package(LLVM)
+
----------------
`CMAKE_PREFIX_PATH` won't work correctly when `CMAKE_FIND_ROOT_PATH` is used and `CMAKE_FIND_ROOT_PATH_MODE_PACKAGE` is set to `ONLY`, which is a fairly common configuration for cross-compilation. Setting `LLVM_DIR` explicitly to `${LLVM_BINARY_DIR}/lib/cmake/llvm` should always work. You could combine that with `NO_DEFAULT_PATH` to ensure you only search in the specified directory, unless you want to be able to find some other LLVM package that's installed on the system?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62640/new/

https://reviews.llvm.org/D62640





More information about the libcxx-commits mailing list