OSDN Git Service

Determine up front which projects are enabled.
authorZachary Turner <zturner@google.com>
Tue, 12 Sep 2017 23:32:34 +0000 (23:32 +0000)
committerZachary Turner <zturner@google.com>
Tue, 12 Sep 2017 23:32:34 +0000 (23:32 +0000)
commitf733fd2a32c12ba90f32399dd4cf43af2b25d1ad
tree94488a03bcde537158e4cb0462b966cac32ba5c2
parent1bcbb0776c0e890fd3d043322f63d1d99f7357ca
Determine up front which projects are enabled.

Some projects need to add conditional dependencies on other projects.
compiler-rt is already doing this, and I attempted to add this to
debuginfo-tests when I ran into the ordering problem, that you can't
conditionally add a dependency unless that dependency's CMakeLists.txt
has already been run (which would allow you to say if (TARGET foo).

The solution to this seems to be to determine very early on the entire
set of projects which is enabled. This is complicated by the fact that
there are multiple ways to enable projects, and different tree layouts
(e.g. mono-repo, out of -tree, external, etc). This patch attempts to
centralize all of this into one place, and then updates compiler-rt to
demonstrate as a proof of concept how this can simplify code.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313091 91177308-0d34-0410-b5e6-96231b3b80d8
CMakeLists.txt
cmake/modules/AddLLVM.cmake