summaryrefslogtreecommitdiffstats
path: root/clang/cmake/modules
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-02-19 00:56:56 +0000
committerReid Kleckner <rnk@google.com>2016-02-19 00:56:56 +0000
commita2550e68a57d1cc852539dd6352a13a95cdcb32e (patch)
treee823fb9c44b2e66f7f150b865ef71c03cd4e90a9 /clang/cmake/modules
parent36c677869ad3a70c01d484da602b4a77a948ef2b (diff)
downloadbcm5719-llvm-a2550e68a57d1cc852539dd6352a13a95cdcb32e.tar.gz
bcm5719-llvm-a2550e68a57d1cc852539dd6352a13a95cdcb32e.zip
Add call to find_package to load LLVM dependencies
ClangConfig requires LLVMConfig, so add find_package call in ClangConfig so find_package(clang REQUIRED CONFIG) will just work. This makes it easier for cmake based projects to use clang, e.g., tools using ClangTooling. Patch by Don Hinton Differential Revision: http://reviews.llvm.org/D13622 llvm-svn: 261290
Diffstat (limited to 'clang/cmake/modules')
-rw-r--r--clang/cmake/modules/ClangConfig.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/cmake/modules/ClangConfig.cmake b/clang/cmake/modules/ClangConfig.cmake
index f052bb9e8c8..d30a277d222 100644
--- a/clang/cmake/modules/ClangConfig.cmake
+++ b/clang/cmake/modules/ClangConfig.cmake
@@ -4,5 +4,7 @@
# uses LLVM's. When it does, we should move this file to ClangConfig.cmake.in
# and call configure_file() on it.
+find_package(LLVM REQUIRED CONFIG)
+
# Provide all our library targets to users.
include("${CMAKE_CURRENT_LIST_DIR}/ClangTargets.cmake")
OpenPOWER on IntegriCloud