llvm.org GIT mirror llvm / 288bc5c
build/cmake: Switch to using llvm-build computed dependencies. - I verified locally that the current dependency lists are identical. - This makes add_llvm_library_dependencies() a no-op. I'll remove it once this change passes the bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145355 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Dunbar 7 years ago
3 changed file(s) with 11 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
2424 ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
2525 endif()
2626 set_target_properties(${name} PROPERTIES FOLDER "Libraries")
27
28 # Add the explicit dependency information for this library.
29 #
30 # It would be nice to verify that we have the dependencies for this library
31 # name, but using get_property(... SET) doesn't suffice to determine if a
32 # property has been set to an empty value.
33 get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${name})
34 target_link_libraries(${name} ${lib_deps})
2735 endmacro(add_llvm_library name)
2836
2937 macro(add_llvm_library_dependencies name)
30 # Save the dependencies of the LLVM library in a variable so that we can
31 # query it when resolve llvm-config-style component -> library mappings.
32 set_property(GLOBAL PROPERTY LLVM_LIB_DEPS_${name} ${ARGN})
33
34 # Then add the actual dependencies to the library target.
35 target_link_libraries(${name} ${ARGN})
3638 endmacro(add_llvm_library_dependencies name)
3739
3840 macro(add_llvm_loadable_module name)
33 get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS)
44
55 foreach(lib ${llvm_libs})
6 get_property(llvm_lib_deps GLOBAL PROPERTY LLVM_LIB_DEPS_${lib})
6 get_property(llvm_lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib})
77 set(all_llvm_lib_deps
8 "${all_llvm_lib_deps}\nset_property(GLOBAL PROPERTY LLVM_LIB_DEPS_${lib} ${llvm_lib_deps})")
8 "${all_llvm_lib_deps}\nset_property(GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib} ${llvm_lib_deps})")
99 endforeach(lib)
1010
1111 configure_file(
151151 set(processed)
152152 while( cursor LESS lst_size )
153153 list(GET expanded_components ${cursor} lib)
154 get_property(lib_deps GLOBAL PROPERTY LLVM_LIB_DEPS_${lib})
154 get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib})
155155 list(APPEND expanded_components ${lib_deps})
156156 # Remove duplicates at the front:
157157 list(REVERSE expanded_components)