diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-11-29 01:31:52 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-11-29 01:31:52 +0000 |
commit | 288bc5cdd0b31b923aa6acc314736f5303e67978 (patch) | |
tree | 05e3860176926538f6f1f339d4930e84f5ab26b1 /cmake/modules | |
parent | ba78c883d4c89bd807fa7ebea7ac6f22f3503223 (diff) | |
download | external_llvm-288bc5cdd0b31b923aa6acc314736f5303e67978.zip external_llvm-288bc5cdd0b31b923aa6acc314736f5303e67978.tar.gz external_llvm-288bc5cdd0b31b923aa6acc314736f5303e67978.tar.bz2 |
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
Diffstat (limited to 'cmake/modules')
-rwxr-xr-x | cmake/modules/AddLLVM.cmake | 14 | ||||
-rw-r--r-- | cmake/modules/CMakeLists.txt | 4 | ||||
-rwxr-xr-x | cmake/modules/LLVM-Config.cmake | 2 |
3 files changed, 11 insertions, 9 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index b486fe4..88e993f 100755 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -25,15 +25,17 @@ macro(add_llvm_library name) ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) endif() set_target_properties(${name} PROPERTIES FOLDER "Libraries") + + # Add the explicit dependency information for this library. + # + # It would be nice to verify that we have the dependencies for this library + # name, but using get_property(... SET) doesn't suffice to determine if a + # property has been set to an empty value. + get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${name}) + target_link_libraries(${name} ${lib_deps}) 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_property(GLOBAL PROPERTY 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) diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt index 2dcfa14..88d9852 100644 --- a/cmake/modules/CMakeLists.txt +++ b/cmake/modules/CMakeLists.txt @@ -4,9 +4,9 @@ set(LLVM_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) get_property(llvm_libs GLOBAL PROPERTY LLVM_LIBS) foreach(lib ${llvm_libs}) - get_property(llvm_lib_deps GLOBAL PROPERTY LLVM_LIB_DEPS_${lib}) + get_property(llvm_lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib}) set(all_llvm_lib_deps - "${all_llvm_lib_deps}\nset_property(GLOBAL PROPERTY LLVM_LIB_DEPS_${lib} ${llvm_lib_deps})") + "${all_llvm_lib_deps}\nset_property(GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib} ${llvm_lib_deps})") endforeach(lib) configure_file( diff --git a/cmake/modules/LLVM-Config.cmake b/cmake/modules/LLVM-Config.cmake index b5f262a..574335c 100755 --- a/cmake/modules/LLVM-Config.cmake +++ b/cmake/modules/LLVM-Config.cmake @@ -152,7 +152,7 @@ function(explicit_map_components_to_libraries out_libs) set(processed) while( cursor LESS lst_size ) list(GET expanded_components ${cursor} lib) - get_property(lib_deps GLOBAL PROPERTY LLVM_LIB_DEPS_${lib}) + get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${lib}) list(APPEND expanded_components ${lib_deps}) # Remove duplicates at the front: list(REVERSE expanded_components) |