summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2014-02-09 16:37:02 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2014-02-09 16:37:02 +0000
commit4c56efbd441d17b61f3e29ee2372e6e460d5a185 (patch)
treed35057dfc166610dce578462ec63955d0141bfe3 /Makefile
parent2fbf9e2fda89c8d478abac7fd13bda524bfc9673 (diff)
Provide CMake package modules in install tree
Teach the Makefile build system to generate and install CMake modules LLVMConfig.cmake and LLVMConfigVersion.cmake so that applications that build with CMake can use 'find_package(LLVM)' even when LLVM is not built with CMake. These modules tell such applications about available LLVM libraries and their dependencies. Run llvm-config to generate the list of libraries and use the results of llvm-build to generate the library dependencies. Use sed to perform substitutions in the LLVMConfig.cmake.in and LLVMConfigVersion.cmake.in sources that our CMake build system uses. Teach the Makefile build system to generate the LLVMExports.cmake file with content similar to that produced by the CMake install(EXPORT) command. Extend llvm-build with an option to generate the library dependencies fragment for this file. Contributed by Brad King. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201053 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index cfca73afc47..29653acf993 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@ LEVEL := .
# 3. Build IR, which builds the Intrinsics.inc file used by libs.
# 4. Build libs, which are needed by llvm-config.
# 5. Build llvm-config, which determines inter-lib dependencies for tools.
-# 6. Build tools and docs.
+# 6. Build tools, docs, and cmake modules.
#
# When cross-compiling, there are some things (tablegen) that need to
# be build for the build system first.
@@ -31,7 +31,7 @@ ifeq ($(BUILD_DIRS_ONLY),1)
OPTIONAL_DIRS := tools/clang/utils/TableGen
else
DIRS := lib/Support lib/TableGen utils lib/IR lib tools/llvm-shlib \
- tools/llvm-config tools docs unittests
+ tools/llvm-config tools docs cmake unittests
OPTIONAL_DIRS := projects bindings
endif