llvm.org GIT mirror llvm / d9d9726
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271440 91177308-0d34-0410-b5e6-96231b3b80d8 Tamas Berghammer 4 years ago
2 changed file(s) with 13 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
337337 exists (e.g., llvm/tools/clang for Clang), then the corresponding variable
338338 will not be used. If the variable for an external project does not point
339339 to a valid path, then that project will not be built.
340
341 **LLVM_EXTERNAL_PROJECTS**:STRING
342 Semicolon-separated list of additional external projects to build as part of
343 llvm. For each project LLVM_EXTERNAL__SOURCE_DIR have to be specified
344 with the path for the source code of the project. Example:
345 ``-DLLVM_EXTERNAL_PROJECTS="Foo;Bar"
346 -DLLVM_EXTERNAL_FOO_SOURCE_DIR=/src/foo
347 -DLLVM_EXTERNAL_BAR_SOURCE_DIR=/src/bar``.
340348
341349 **LLVM_USE_OPROFILE**:BOOL
342350 Enable building OProfile JIT support. Defaults to OFF.
4949 # file as external projects.
5050 add_llvm_implicit_projects()
5151
52 # Add subprojects specified using LLVM_EXTERNAL_PROJECTS
53 foreach(p ${LLVM_EXTERNAL_PROJECTS})
54 add_llvm_external_project(${p})
55 endforeach(p)
56
5257 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)