[CMake] Use target_link_libraries(INTERFACE|PRIVATE) on CMake-2.8.12 to increase...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 26 Feb 2014 06:53:16 +0000 (06:53 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 26 Feb 2014 06:53:16 +0000 (06:53 +0000)
commit07f95b3218e6590ac3476200147f8ce3ffafed93
tree1f6aa02950572c800e050253ab428bab10d000b2
parentecb903c1b57e46a2ee9e08dcd0013cfa33870b60
[CMake] Use target_link_libraries(INTERFACE|PRIVATE) on CMake-2.8.12 to increase opportunity for parallel build.

target_link_libraries(INTERFACE) doesn't bring inter-target dependencies in add_library,
although final targets have dependencies to whole dependent libraries.
It makes most libraries can be built in parallel.

target_link_libraries(PRIVATE) is used to shaared library.
Each dependent library is linked to the target.so, and its user will not see its grandchildren.
For example,

  - libclang.so has sufficient libclang*.a(s).
  - c-index-test requires just only libclang.so.

FIXME: lld is tweaked minimally. Adding INTERFACE in each library would be better thing.

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