summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorTamas Berghammer <tberghammer@google.com>2016-06-01 23:00:45 +0000
committerTamas Berghammer <tberghammer@google.com>2016-06-01 23:00:45 +0000
commitae2fda11171c1260d60141db6110fd59a1b6620f (patch)
tree896cb642f141ea1a9256e0a23eefa1f3f1a97c03 /llvm/tools
parentf021d269992ef36f2c97ae707dfd7d6c0b38753c (diff)
downloadbcm5719-llvm-ae2fda11171c1260d60141db6110fd59a1b6620f.tar.gz
bcm5719-llvm-ae2fda11171c1260d60141db6110fd59a1b6620f.zip
Add new LLVM_EXTERNAL_PROJECTS option to cmake
The new option makes it possible to build external projects as part of the llvm build without copying (or symlinking) then into llvm/tool with specifying a few additional cmake variables. Example usage (2 additional project called foo and bar): -DLLVM_EXTERNAL_PROJECTS="Foo;Bar" -DLLVM_EXTERNAL_FOO_SOURCE_DIR=/src/foo -DLLVM_EXTERNAL_BAR_SOURCE_DIR=/src/bar Note: This is the extension of the approach we already support for clang/lldb/poly with adding an option to specify additional supported projects. Differential revision: http://reviews.llvm.org/D20838 llvm-svn: 271440
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/tools/CMakeLists.txt b/llvm/tools/CMakeLists.txt
index 8ca7bae8971..e2974fa535d 100644
--- a/llvm/tools/CMakeLists.txt
+++ b/llvm/tools/CMakeLists.txt
@@ -50,4 +50,9 @@ add_llvm_external_project(lldb)
# file as external projects.
add_llvm_implicit_projects()
+# Add subprojects specified using LLVM_EXTERNAL_PROJECTS
+foreach(p ${LLVM_EXTERNAL_PROJECTS})
+ add_llvm_external_project(${p})
+endforeach(p)
+
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)
OpenPOWER on IntegriCloud