summaryrefslogtreecommitdiffstats
path: root/cmake
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
commit31cb91e5a8881beeeb011cbd6a78f96a0465da22 (patch)
tree6dee0fa694d0bff41c1f4e3e3ca1995b680cf6da /cmake
parent00a50daf94a73c4b02056cdfdce88feb660b9f88 (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261290 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/ClangConfig.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmake/modules/ClangConfig.cmake b/cmake/modules/ClangConfig.cmake
index f052bb9e8c..d30a277d22 100644
--- a/cmake/modules/ClangConfig.cmake
+++ b/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")