Commit Graph

53 Commits

Author SHA1 Message Date
Michael Gottesman fe9d2d81f6 [cmake] Move creation of ClangTargets and installation of ClangConfig.cmake from ./CMakeLists.txt -> ./cmake/modules/CMakeLists.txt.
This matches LLVM.

llvm-svn: 274157
2016-06-29 20:22:44 +00:00
Reid Kleckner a2550e68a5 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
2016-02-19 00:56:56 +00:00
Reid Kleckner ed8bca4f42 Make it easier to build against a pre-built Clang package with CMake
Installing <prefix>/share/clang/cmake/ClangConfig.cmake makes CMake's
builtin find_package() utility work with Clang. This also allows
downstream consumers of Clang to statically link against libraries like
clangAST and have that pull in dependencies like clangBasic and
LLVMSupport.

See the CMake docs on packages:
http://www.cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html

llvm-svn: 221411
2014-11-05 23:14:59 +00:00