aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules/AddLLVM.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/AddLLVM.cmake')
-rwxr-xr-xcmake/modules/AddLLVM.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index 5e3a4c1c43..cf9ea72107 100755
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -34,6 +34,14 @@ macro(add_llvm_library name)
set_target_properties(${name} PROPERTIES FOLDER "Libraries")
endmacro(add_llvm_library name)
+macro(add_llvm_library_dependencies name)
+ # Save the dependencies of the LLVM library in a variable so that we can
+ # query it when resolve llvm-config-style component -> library mappings.
+ set(LLVM_LIB_DEPS_${name} ${ARGN})
+
+ # Then add the actual dependencies to the library target.
+ target_link_libraries(${name} ${ARGN})
+endmacro(add_llvm_library_dependencies name)
macro(add_llvm_loadable_module name)
if( NOT LLVM_ON_UNIX OR CYGWIN )