OSDN Git Service

[cmake] Declare LLVM_CMAKE_PATH for use in subprojects
authorMichal Gorny <mgorny@gentoo.org>
Wed, 19 Oct 2016 12:18:34 +0000 (12:18 +0000)
committerMichal Gorny <mgorny@gentoo.org>
Wed, 19 Oct 2016 12:18:34 +0000 (12:18 +0000)
commit7b63453e9a4b8d646473ae99492e1e95046a6981
tree0eb32c7c7b84e5cc193b56ee9868390a029fcabe
parentab4e0362c7a7f974b514b1a7479209edb7271124
[cmake] Declare LLVM_CMAKE_PATH for use in subprojects

Declare the LLVM_CMAKE_PATH to the source directory location of CMake
files, in order to make it possible to easily use them in subprojects.
Such a variable is already declared in most of LLVM projects
(and inconsistently mixed with direct source tree references), including
Clang, LLDB, compiler-rt, libcxx... Declaring it inside main LLVM tree
makes it possible to avoid having to declare fallback values or use
conditionals in those projects.

It should be noted that in some of the subprojects LLVM_CMAKE_PATH is
used to reference generated LLVMConfig.cmake file. However, these
references are conditional to stand-alone builds and explicitly
including this file is unnecessary in combined builds.

Differential Revision: https://reviews.llvm.org/D25724

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284581 91177308-0d34-0410-b5e6-96231b3b80d8
CMakeLists.txt
lib/LTO/CMakeLists.txt