[llvm-commits] [llvm] r145355 - in /llvm/trunk/cmake/modules: AddLLVM.cmake CMakeLists.txt LLVM-Config.cmake
Daniel Dunbar
daniel at zuster.org
Mon Nov 28 17:31:52 PST 2011
Author: ddunbar
Date: Mon Nov 28 19:31:52 2011
New Revision: 145355
URL: http://llvm.org/viewvc/llvm-project?rev=145355&view=rev
Log:
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.
Modified:
llvm/trunk/cmake/modules/AddLLVM.cmake
llvm/trunk/cmake/modules/CMakeLists.txt
llvm/trunk/cmake/modules/LLVM-Config.cmake
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=145355&r1=145354&r2=145355&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Mon Nov 28 19:31:52 2011
@@ -25,15 +25,17 @@
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)
Modified: llvm/trunk/cmake/modules/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/CMakeLists.txt?rev=145355&r1=145354&r2=145355&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/CMakeLists.txt (original)
+++ llvm/trunk/cmake/modules/CMakeLists.txt Mon Nov 28 19:31:52 2011
@@ -4,9 +4,9 @@
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(
Modified: llvm/trunk/cmake/modules/LLVM-Config.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVM-Config.cmake?rev=145355&r1=145354&r2=145355&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/LLVM-Config.cmake (original)
+++ llvm/trunk/cmake/modules/LLVM-Config.cmake Mon Nov 28 19:31:52 2011
@@ -152,7 +152,7 @@
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)
More information about the llvm-commits
mailing list