This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Declare LLVM_CMAKE_PATH for use in subprojects
ClosedPublic

Authored by mgorny on Oct 18 2016, 5:46 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

mgorny updated this revision to Diff 74985.Oct 18 2016, 5:46 AM
mgorny retitled this revision from to [cmake] Declare LLVM_CMAKE_PATH for use in subprojects.
mgorny updated this object.
mgorny added reviewers: beanz, krytarowski.
mgorny added a subscriber: llvm-commits.

Please let me know if I should post related patches to other projects for review, or just commit them? Assuming they're pretty much about changing get_svn_script alike in LLVM.

beanz accepted this revision.Oct 18 2016, 2:47 PM
beanz edited edge metadata.

LGTM. Feel free to commit the patches for other projects too. Thanks!

This revision is now accepted and ready to land.Oct 18 2016, 2:47 PM
This revision was automatically updated to reflect the committed changes.

Thanks. Committed now, and updates for other projects will follow shortly.