Skip to content

Commit

Permalink
[CMake] Deliberately get all LLVM library dependencies for standalone…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
jrose-apple committed Feb 5, 2014
1 parent 1b7969e commit ab70fcf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmake/modules/LLVM-Config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit ab70fcf

Please sign in to comment.