diff options
author | Jordan Rose <jordan_rose@apple.com> | 2014-02-05 00:02:42 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2014-02-05 00:02:42 +0000 |
commit | ab70fcff6b8a567cbe438ac84f210923496a2c0c (patch) | |
tree | c163e2f3f974de0349fd1b054a716bfc79687aec /cmake | |
parent | 1b7969eee250d4e3d12666a909971dd26adcbd77 (diff) | |
download | llvm-ab70fcff6b8a567cbe438ac84f210923496a2c0c.tar.gz llvm-ab70fcff6b8a567cbe438ac84f210923496a2c0c.tar.bz2 llvm-ab70fcff6b8a567cbe438ac84f210923496a2c0c.tar.xz |
[CMake] Deliberately get all LLVM library dependencies for standalone builds.
CMake won't expand the dependency graph for us if the dependencies are in
another project, which leads to link errors in the standalone build.
This is a refinement of r200765.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200812 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/LLVM-Config.cmake | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/modules/LLVM-Config.cmake b/cmake/modules/LLVM-Config.cmake index 3139564932..3b0c948e6a 100644 --- a/cmake/modules/LLVM-Config.cmake +++ b/cmake/modules/LLVM-Config.cmake @@ -62,7 +62,13 @@ endmacro(llvm_config) function(explicit_llvm_config executable) set( link_components ${ARGN} ) - llvm_map_components_to_libnames(LIBRARIES ${link_components}) + # Check for out-of-tree builds. + if(PROJECT_NAME STREQUAL "LLVM") + llvm_map_components_to_libnames(LIBRARIES ${link_components}) + else() + explicit_map_components_to_libraries(LIBRARIES ${link_components}) + endif() + target_link_libraries(${executable} ${LIBRARIES}) endfunction(explicit_llvm_config) |