[llvm] r200812 - [CMake] Deliberately get all LLVM library dependencies for standalone builds.
Jordan Rose
jordan_rose at apple.com
Tue Feb 4 16:02:42 PST 2014
Author: jrose
Date: Tue Feb 4 18:02:42 2014
New Revision: 200812
URL: http://llvm.org/viewvc/llvm-project?rev=200812&view=rev
Log:
[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.
Modified:
llvm/trunk/cmake/modules/LLVM-Config.cmake
Modified: llvm/trunk/cmake/modules/LLVM-Config.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVM-Config.cmake?rev=200812&r1=200811&r2=200812&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/LLVM-Config.cmake (original)
+++ llvm/trunk/cmake/modules/LLVM-Config.cmake Tue Feb 4 18:02:42 2014
@@ -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)
More information about the llvm-commits
mailing list