[llvm] 247c4fc - [CMake] Use find_dependency in LLVMConfig.cmake
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 23:39:12 PDT 2020
Author: Petr Hosek
Date: 2020-09-21T23:39:01-07:00
New Revision: 247c4fc50720ed48db2464bbe59839eedbe16794
URL: https://github.com/llvm/llvm-project/commit/247c4fc50720ed48db2464bbe59839eedbe16794
DIFF: https://github.com/llvm/llvm-project/commit/247c4fc50720ed48db2464bbe59839eedbe16794.diff
LOG: [CMake] Use find_dependency in LLVMConfig.cmake
This prefered over find_package as find_dependency forwards the correct
parameters for QUIET and REQUIRED to find_package.
Differential Revision: https://reviews.llvm.org/D88069
Added:
Modified:
llvm/cmake/modules/LLVMConfig.cmake.in
Removed:
################################################################################
diff --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
index d8a511b69fdd..d4c65ef73505 100644
--- a/llvm/cmake/modules/LLVMConfig.cmake.in
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in
@@ -52,14 +52,16 @@ set(LLVM_ENABLE_THREADS @LLVM_ENABLE_THREADS@)
set(LLVM_ENABLE_UNWIND_TABLES @LLVM_ENABLE_UNWIND_TABLES@)
+include(CMakeFindDependencyMacro)
+
set(LLVM_ENABLE_ZLIB @LLVM_ENABLE_ZLIB@)
if(LLVM_ENABLE_ZLIB)
- find_package(ZLIB)
+ find_dependency(ZLIB)
endif()
set(LLVM_ENABLE_LIBXML2 @LLVM_ENABLE_LIBXML2@)
if(LLVM_ENABLE_LIBXML2)
- find_package(LibXml2)
+ find_dependency(LibXml2)
endif()
set(LLVM_WITH_Z3 @LLVM_WITH_Z3@)
More information about the llvm-commits
mailing list