[llvm-commits] [llvm] r113819 - in /llvm/trunk: ./ cmake/modules/ examples/BrainF/ examples/ExceptionDemo/ examples/Fibonacci/ examples/HowToUseJIT/ examples/Kaleidoscope/Chapter3/ examples/Kaleidoscope/Chapter4/ examples/Kaleidoscope/Chapter5/ examples/Kaleidoscope/Chapter6/ examples/Kaleidoscope/Chapter7/ examples/ModuleMaker/ examples/ParallelJIT/ lib/Analysis/ lib/Analysis/IPA/ lib/Archive/ lib/AsmParser/ lib/Bitcode/Reader/ lib/CodeGen/ lib/CodeGen/AsmPrinter/ lib/CodeGen/SelectionDAG/ lib/CompilerDriver/ lib/Exec...

Michael J. Spencer bigcheesegs at gmail.com
Mon Sep 13 16:59:48 PDT 2010


Author: mspencer
Date: Mon Sep 13 18:59:48 2010
New Revision: 113819

URL: http://llvm.org/viewvc/llvm-project?rev=113819&view=rev
Log:
Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."

This reverts commit r113632

Conflicts:

	cmake/modules/AddLLVM.cmake

Added:
    llvm/trunk/cmake/modules/LLVMConfig.cmake   (with props)
    llvm/trunk/cmake/modules/LLVMLibDeps.cmake
Removed:
    llvm/trunk/cmake/modules/LLVMConfig.cmake.in
Modified:
    llvm/trunk/CMakeLists.txt
    llvm/trunk/cmake/modules/AddLLVM.cmake
    llvm/trunk/cmake/modules/CMakeLists.txt
    llvm/trunk/examples/BrainF/CMakeLists.txt
    llvm/trunk/examples/ExceptionDemo/CMakeLists.txt
    llvm/trunk/examples/Fibonacci/CMakeLists.txt
    llvm/trunk/examples/HowToUseJIT/CMakeLists.txt
    llvm/trunk/examples/Kaleidoscope/Chapter3/CMakeLists.txt
    llvm/trunk/examples/Kaleidoscope/Chapter4/CMakeLists.txt
    llvm/trunk/examples/Kaleidoscope/Chapter5/CMakeLists.txt
    llvm/trunk/examples/Kaleidoscope/Chapter6/CMakeLists.txt
    llvm/trunk/examples/Kaleidoscope/Chapter7/CMakeLists.txt
    llvm/trunk/examples/ModuleMaker/CMakeLists.txt
    llvm/trunk/examples/ParallelJIT/CMakeLists.txt
    llvm/trunk/lib/Analysis/CMakeLists.txt
    llvm/trunk/lib/Analysis/IPA/CMakeLists.txt
    llvm/trunk/lib/Archive/CMakeLists.txt
    llvm/trunk/lib/AsmParser/CMakeLists.txt
    llvm/trunk/lib/Bitcode/Reader/CMakeLists.txt
    llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt
    llvm/trunk/lib/CodeGen/CMakeLists.txt
    llvm/trunk/lib/CodeGen/SelectionDAG/CMakeLists.txt
    llvm/trunk/lib/CompilerDriver/CMakeLists.txt
    llvm/trunk/lib/ExecutionEngine/CMakeLists.txt
    llvm/trunk/lib/ExecutionEngine/Interpreter/CMakeLists.txt
    llvm/trunk/lib/ExecutionEngine/JIT/CMakeLists.txt
    llvm/trunk/lib/Linker/CMakeLists.txt
    llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt
    llvm/trunk/lib/Target/ARM/AsmParser/CMakeLists.txt
    llvm/trunk/lib/Target/ARM/AsmPrinter/CMakeLists.txt
    llvm/trunk/lib/Target/ARM/CMakeLists.txt
    llvm/trunk/lib/Target/CMakeLists.txt
    llvm/trunk/lib/Target/X86/AsmParser/CMakeLists.txt
    llvm/trunk/lib/Target/X86/AsmPrinter/CMakeLists.txt
    llvm/trunk/lib/Target/X86/CMakeLists.txt
    llvm/trunk/lib/Target/X86/Disassembler/CMakeLists.txt
    llvm/trunk/lib/Transforms/IPO/CMakeLists.txt
    llvm/trunk/lib/Transforms/InstCombine/CMakeLists.txt
    llvm/trunk/lib/Transforms/Instrumentation/CMakeLists.txt
    llvm/trunk/lib/Transforms/Scalar/CMakeLists.txt
    llvm/trunk/lib/Transforms/Utils/CMakeLists.txt
    llvm/trunk/tools/CMakeLists.txt
    llvm/trunk/tools/bugpoint/CMakeLists.txt
    llvm/trunk/tools/llc/CMakeLists.txt
    llvm/trunk/tools/lli/CMakeLists.txt
    llvm/trunk/tools/llvm-ar/CMakeLists.txt
    llvm/trunk/tools/llvm-as/CMakeLists.txt
    llvm/trunk/tools/llvm-bcanalyzer/CMakeLists.txt
    llvm/trunk/tools/llvm-config/CMakeLists.txt
    llvm/trunk/tools/llvm-diff/CMakeLists.txt
    llvm/trunk/tools/llvm-dis/CMakeLists.txt
    llvm/trunk/tools/llvm-extract/CMakeLists.txt
    llvm/trunk/tools/llvm-ld/CMakeLists.txt
    llvm/trunk/tools/llvm-link/CMakeLists.txt
    llvm/trunk/tools/llvm-mc/CMakeLists.txt
    llvm/trunk/tools/llvm-nm/CMakeLists.txt
    llvm/trunk/tools/llvm-prof/CMakeLists.txt
    llvm/trunk/tools/llvm-ranlib/CMakeLists.txt
    llvm/trunk/tools/opt/CMakeLists.txt

Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -272,7 +272,6 @@
 
 # Everything else depends on Support and System:
 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} ${LLVM_LIBS} )
-set(LLVM_COMMON_LIBS LLVMSupport LLVMSystem)
 
 set(LLVM_TABLEGEN "tblgen" CACHE
   STRING "Native TableGen executable. Saves building one when cross-compiling.")
@@ -373,11 +372,6 @@
 
 add_subdirectory(cmake/modules)
 
-install(EXPORT LLVM
-  DESTINATION lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/
-  FILE LLVMTargets.cmake
-  )
-
 install(DIRECTORY include/
   DESTINATION include
   FILES_MATCHING

Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Mon Sep 13 18:59:48 2010
@@ -1,21 +1,5 @@
 include(LLVMProcessSources)
-
-function(get_system_libs return_var)
-  # Returns in `return_var' a list of system libraries used by LLVM.
-  if( NOT MSVC )
-    if( MINGW )
-      set(system_libs ${system_libs} imagehlp psapi)
-    elseif( CMAKE_HOST_UNIX )
-      if( HAVE_LIBDL )
-        set(system_libs ${system_libs} ${CMAKE_DL_LIBS})
-      endif()
-      if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD )
-        set(system_libs ${system_libs} pthread)
-      endif()
-    endif( MINGW )
-  endif( NOT MSVC )
-  set(${return_var} ${system_libs} PARENT_SCOPE)
-endfunction(get_system_libs)
+include(LLVMConfig)
 
 macro(add_llvm_library name)
   llvm_process_sources( ALL_FILES ${ARGN} )
@@ -25,11 +9,7 @@
   if( LLVM_COMMON_DEPENDS )
     add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
   endif( LLVM_COMMON_DEPENDS )
-  if (LLVM_COMMON_LIBS)
-    target_link_libraries(${name} ${LLVM_COMMON_LIBS})
-  endif()
   install(TARGETS ${name}
-    EXPORT LLVM
     LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
     ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
   # The LLVM Target library shall be built before its sublibraries
@@ -58,7 +38,6 @@
     endif()
 
     install(TARGETS ${name}
-      EXPORT LLVM
       LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
       ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
   endif()
@@ -78,12 +57,12 @@
       target_link_libraries( ${name} ${lib} )
     endforeach(lib)
   endif( LLVM_USED_LIBS )
+  if( LLVM_LINK_COMPONENTS )
+    llvm_config(${name} ${LLVM_LINK_COMPONENTS})
+  endif( LLVM_LINK_COMPONENTS )
   if( LLVM_COMMON_DEPENDS )
     add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
   endif( LLVM_COMMON_DEPENDS )
-  if (LLVM_COMMON_LIBS)
-    target_link_libraries(${name} ${LLVM_COMMON_LIBS})
-  endif()
   if( NOT MINGW )
     get_system_libs(llvm_system_libs)
     if( llvm_system_libs )
@@ -130,61 +109,3 @@
   endif (TABLEGEN_OUTPUT)
   set(CURRENT_LLVM_TARGET LLVM${target_name} PARENT_SCOPE)
 endmacro(add_llvm_target)
-
-macro(llvm_get_target_libraries return_var)
-  set( link_components ${ARGN} )
-  foreach(c ${link_components})
-    # add codegen, asmprinter, asmparser, disassembler
-    list(FIND LLVM_TARGETS_TO_BUILD ${c} idx)
-    if( NOT idx LESS 0 )
-      list(FIND llvm_libs "LLVM${c}CodeGen" idx)
-      if( NOT idx LESS 0 )
-        list(APPEND expanded_components "LLVM${c}CodeGen")
-      else()
-        list(FIND llvm_libs "LLVM${c}" idx)
-        if( NOT idx LESS 0 )
-          list(APPEND expanded_components "LLVM${c}")
-        else()
-          message(FATAL_ERROR "Target ${c} is not in the set of libraries.")
-        endif()
-      endif()
-      list(FIND llvm_libs "LLVM${c}AsmPrinter" asmidx)
-      if( NOT asmidx LESS 0 )
-        list(APPEND expanded_components "LLVM${c}AsmPrinter")
-      endif()
-      list(FIND llvm_libs "LLVM${c}AsmParser" asmidx)
-      if( NOT asmidx LESS 0 )
-        list(APPEND expanded_components "LLVM${c}AsmParser")
-      endif()
-      list(FIND llvm_libs "LLVM${c}Info" asmidx)
-      if( NOT asmidx LESS 0 )
-        list(APPEND expanded_components "LLVM${c}Info")
-      endif()
-      list(FIND llvm_libs "LLVM${c}Disassembler" asmidx)
-      if( NOT asmidx LESS 0 )
-        list(APPEND expanded_components "LLVM${c}Disassembler")
-      endif()
-    elseif( c STREQUAL "native" )
-      list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
-    elseif( c STREQUAL "nativecodegen" )
-      list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
-    elseif( c STREQUAL "backend" )
-      # same case as in `native'.
-    elseif( c STREQUAL "engine" OR c STREQUAL "jit")
-      # TODO: as we assume we are on X86, this is `jit'.
-      list(APPEND expanded_components "LLVMJIT")
-    elseif( c STREQUAL "interpreter" )
-      list(APPEND expanded_components "LLVMInterpreter")
-    elseif( c STREQUAL "all" )
-      list(APPEND expanded_components ${llvm_libs})
-    else( NOT idx LESS 0 )
-      list(APPEND expanded_components LLVM${c})
-    endif( NOT idx LESS 0 )
-  endforeach(c)
-  set(${return_var} ${expanded_components})
-endmacro(llvm_get_target_libraries)
-
-macro(add_llvm_link_components target_name)
-  llvm_get_target_libraries(target_libs ${ARGN})
-  target_link_libraries(${target_name} ${target_libs})
-endmacro()

Modified: llvm/trunk/cmake/modules/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/CMakeLists.txt (original)
+++ llvm/trunk/cmake/modules/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,18 +1,12 @@
-set(LLVM_CFLAGS "${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
-set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
-set(LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
-llvm_get_target_libraries(LLVM_JIT_LIBS jit)
-llvm_get_target_libraries(LLVM_INTERPRETER_LIBS interpreter)
-llvm_get_target_libraries(LLVM_NATIVECODEGEN_LIBS nativecodegen)
-get_system_libs(LLVM_SYSTEM_LIBS)
+set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/share/llvm/cmake")
 
 configure_file(
-  LLVMConfig.cmake.in
-  ${LLVM_BINARY_DIR}/cmake/modules/LLVMConfig.cmake
-  @ONLY
-  )
+  LLVM.cmake
+  ${llvm_cmake_builddir}/LLVM.cmake
+  @ONLY)
 
 install(FILES
-  ${LLVM_BINARY_DIR}/cmake/modules/LLVMConfig.cmake
-  DESTINATION lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/
-  )
+  ${llvm_cmake_builddir}/LLVM.cmake
+  LLVMConfig.cmake
+  LLVMLibDeps.cmake
+  DESTINATION share/llvm/cmake)

Added: llvm/trunk/cmake/modules/LLVMConfig.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVMConfig.cmake?rev=113819&view=auto
==============================================================================
--- llvm/trunk/cmake/modules/LLVMConfig.cmake (added)
+++ llvm/trunk/cmake/modules/LLVMConfig.cmake Mon Sep 13 18:59:48 2010
@@ -0,0 +1,165 @@
+function(get_system_libs return_var)
+  # Returns in `return_var' a list of system libraries used by LLVM.
+  if( NOT MSVC )
+    if( MINGW )
+      set(system_libs ${system_libs} imagehlp psapi)
+    elseif( CMAKE_HOST_UNIX )
+      if( HAVE_LIBDL )
+	set(system_libs ${system_libs} ${CMAKE_DL_LIBS})
+      endif()
+      if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD )
+	set(system_libs ${system_libs} pthread)
+      endif()
+    endif( MINGW )
+  endif( NOT MSVC )
+  set(${return_var} ${system_libs} PARENT_SCOPE)
+endfunction(get_system_libs)
+
+
+function(is_llvm_target_library library return_var)
+  # Sets variable `return_var' to ON if `library' corresponds to a
+  # LLVM supported target. To OFF if it doesn't.
+  set(${return_var} OFF PARENT_SCOPE)
+  string(TOUPPER "${library}" capitalized_lib)
+  string(TOUPPER "${LLVM_ALL_TARGETS}" targets)
+  foreach(t ${targets})
+    if( capitalized_lib STREQUAL "LLVM${t}" OR
+	capitalized_lib STREQUAL "LLVM${t}CODEGEN" OR
+	capitalized_lib STREQUAL "LLVM${t}ASMPARSER" OR
+	capitalized_lib STREQUAL "LLVM${t}ASMPRINTER" OR
+	capitalized_lib STREQUAL "LLVM${t}DISASSEMBLER" OR
+	capitalized_lib STREQUAL "LLVM${t}INFO" )
+      set(${return_var} ON PARENT_SCOPE)
+      break()
+    endif()
+  endforeach()
+endfunction(is_llvm_target_library)
+
+
+macro(llvm_config executable)
+  explicit_llvm_config(${executable} ${ARGN})
+endmacro(llvm_config)
+
+
+function(explicit_llvm_config executable)
+  set( link_components ${ARGN} )
+
+  explicit_map_components_to_libraries(LIBRARIES ${link_components})
+  target_link_libraries(${executable} ${LIBRARIES})
+endfunction(explicit_llvm_config)
+
+
+# This is a variant intended for the final user:
+function(llvm_map_components_to_libraries OUT_VAR)
+  explicit_map_components_to_libraries(result ${ARGN})
+  get_system_libs(sys_result)
+  set( ${OUT_VAR} ${result} ${sys_result} PARENT_SCOPE )
+endfunction(llvm_map_components_to_libraries)
+
+
+function(explicit_map_components_to_libraries out_libs)
+  set( link_components ${ARGN} )
+  foreach(c ${link_components})
+    # add codegen, asmprinter, asmparser, disassembler
+    list(FIND LLVM_TARGETS_TO_BUILD ${c} idx)
+    if( NOT idx LESS 0 )
+      list(FIND llvm_libs "LLVM${c}CodeGen" idx)
+      if( NOT idx LESS 0 )
+	list(APPEND expanded_components "LLVM${c}CodeGen")
+      else()
+	list(FIND llvm_libs "LLVM${c}" idx)
+	if( NOT idx LESS 0 )
+	  list(APPEND expanded_components "LLVM${c}")
+	else()
+	  message(FATAL_ERROR "Target ${c} is not in the set of libraries.")
+	endif()
+      endif()
+      list(FIND llvm_libs "LLVM${c}AsmPrinter" asmidx)
+      if( NOT asmidx LESS 0 )
+        list(APPEND expanded_components "LLVM${c}AsmPrinter")
+      endif()
+      list(FIND llvm_libs "LLVM${c}AsmParser" asmidx)
+      if( NOT asmidx LESS 0 )
+        list(APPEND expanded_components "LLVM${c}AsmParser")
+      endif()
+      list(FIND llvm_libs "LLVM${c}Info" asmidx)
+      if( NOT asmidx LESS 0 )
+        list(APPEND expanded_components "LLVM${c}Info")
+      endif()
+      list(FIND llvm_libs "LLVM${c}Disassembler" asmidx)
+      if( NOT asmidx LESS 0 )
+        list(APPEND expanded_components "LLVM${c}Disassembler")
+      endif()
+    elseif( c STREQUAL "native" )
+      list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
+    elseif( c STREQUAL "nativecodegen" )
+      list(APPEND expanded_components "LLVM${LLVM_NATIVE_ARCH}CodeGen")
+    elseif( c STREQUAL "backend" )
+      # same case as in `native'.
+    elseif( c STREQUAL "engine" )
+      # TODO: as we assume we are on X86, this is `jit'.
+      list(APPEND expanded_components "LLVMJIT")
+    elseif( c STREQUAL "all" )
+      list(APPEND expanded_components ${llvm_libs})
+    else( NOT idx LESS 0 )
+      list(APPEND expanded_components LLVM${c})
+    endif( NOT idx LESS 0 )
+  endforeach(c)
+  # We must match capitalization.
+  string(TOUPPER "${llvm_libs}" capitalized_libs)
+  list(REMOVE_DUPLICATES expanded_components)
+  list(LENGTH expanded_components lst_size)
+  set(result "")
+  while( 0 LESS ${lst_size} )
+    list(GET expanded_components 0 c)
+    string(TOUPPER "${c}" capitalized)
+    list(FIND capitalized_libs ${capitalized} idx)
+    set(add_it ON)
+    if( idx LESS 0 )
+      # The library is unkown. Maybe is an ommitted target?
+      is_llvm_target_library(${c} iltl_result)
+      if( NOT iltl_result )
+	message(FATAL_ERROR "Library ${c} not found in list of llvm libraries.")
+      endif()
+      set(add_it OFF)
+    endif( idx LESS 0 )
+    list(GET llvm_libs ${idx} canonical_lib)
+    list(REMOVE_ITEM result ${canonical_lib})
+    foreach(c ${MSVC_LIB_DEPS_${canonical_lib}})
+      list(REMOVE_ITEM expanded_components ${c})
+    endforeach()
+    if( add_it )
+      list(APPEND result ${canonical_lib})
+      list(APPEND expanded_components ${MSVC_LIB_DEPS_${canonical_lib}})
+    endif()
+    list(REMOVE_AT expanded_components 0)
+    list(LENGTH expanded_components lst_size)
+  endwhile( 0 LESS ${lst_size} )
+  set(${out_libs} ${result} PARENT_SCOPE)
+endfunction(explicit_map_components_to_libraries)
+
+
+# The library dependency data is contained in the file
+# LLVMLibDeps.cmake on this directory. It is automatically generated
+# by tools/llvm-config/CMakeLists.txt when the build comprises all the
+# targets and we are on a environment Posix enough to build the
+# llvm-config script. This, in practice, just excludes MSVC.
+
+# When you remove or rename a library from the build, be sure to
+# remove its file from lib/ as well, or the GenLibDeps.pl script will
+# include it on its analysis!
+
+# The format generated by GenLibDeps.pl
+
+# libLLVMARMAsmPrinter.a: libLLVMMC.a libLLVMSupport.a
+
+# is translated to:
+
+# set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport)
+
+# It is necessary to remove the `lib' prefix and the `.a' suffix.
+
+# This 'sed' script should do the trick:
+# sed -e s'#\.a##g' -e 's#libLLVM#LLVM#g' -e 's#: # #' -e 's#\(.*\)#set(MSVC_LIB_DEPS_\1)#' ~/llvm/tools/llvm-config/LibDeps.txt
+
+include(LLVMLibDeps)

Propchange: llvm/trunk/cmake/modules/LLVMConfig.cmake
------------------------------------------------------------------------------
    svn:executable = *

Removed: llvm/trunk/cmake/modules/LLVMConfig.cmake.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVMConfig.cmake.in?rev=113818&view=auto
==============================================================================
--- llvm/trunk/cmake/modules/LLVMConfig.cmake.in (original)
+++ llvm/trunk/cmake/modules/LLVMConfig.cmake.in (removed)
@@ -1,11 +0,0 @@
-get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-include(${SELF_DIR}/LLVMTargets.cmake)
-get_filename_component(LLVM_INCLUDE_DIRS "${SELF_DIR}/../../../include" ABSOLUTE)
-set(LLVM_CPPFLAGS "@LLVM_CPPFLAGS@")
-set(LLVM_CFLAGS "@LLVM_CFLAGS@")
-set(LLVM_CXXFLAGS "@LLVM_CXXFLAGS@")
-set(LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@")
-set(LLVM_JIT_LIBS "@LLVM_JIT_LIBS@")
-set(LLVM_INTERPRETER_LIBS "@LLVM_INTERPRETER_LIBS@")
-set(LLVM_NATIVECODEGEN_LIBS "@LLVM_NATIVECODEGEN_LIBS@")
-set(LLVM_BUILDMODE "@LLVM_BUILDMODE@")

Added: llvm/trunk/cmake/modules/LLVMLibDeps.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/LLVMLibDeps.cmake?rev=113819&view=auto
==============================================================================
--- llvm/trunk/cmake/modules/LLVMLibDeps.cmake (added)
+++ llvm/trunk/cmake/modules/LLVMLibDeps.cmake Mon Sep 13 18:59:48 2010
@@ -0,0 +1,71 @@
+set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMAsmPrinter LLVMARMInfo LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMARMInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMAlphaAsmPrinter LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMAlphaInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMAlphaInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMAsmParser LLVMCore LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMMCParser LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMBitReader LLVMCore LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMBlackfinAsmPrinter LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMBlackfinInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMCBackend LLVMAnalysis LLVMCBackendInfo LLVMCodeGen LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
+set(MSVC_LIB_DEPS_LLVMCBackendInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMCellSPUAsmPrinter LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMCellSPUInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalysis LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
+set(MSVC_LIB_DEPS_LLVMCore LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMCppBackend LLVMCore LLVMCppBackendInfo LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMCppBackendInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMExecutionEngine LLVMCore LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMInstCombine LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
+set(MSVC_LIB_DEPS_LLVMInstrumentation LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTransformUtils)
+set(MSVC_LIB_DEPS_LLVMInterpreter LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMJIT LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMMC LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMLinker LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem LLVMTransformUtils)
+set(MSVC_LIB_DEPS_LLVMMBlazeAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMBlazeCodeGen LLVMCodeGen LLVMCore LLVMMBlazeInfo LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMBlazeInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMMC LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMCodeGen LLVMARMInfo LLVMAlphaAsmPrinter LLVMAlphaCodeGen LLVMAlphaInfo LLVMBlackfinAsmPrinter LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUAsmPrinter LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmPrinter LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430AsmPrinter LLVMMSP430CodeGen LLVMMSP430Info LLVMMipsAsmPrinter LLVMMipsCodeGen LLVMMipsInfo LLVMPIC16AsmPrinter LLVMPIC16CodeGen LLVMPIC16Info LLVMPowerPCAsmPrinter LLVMPowerPCCodeGen LLVMPowerPCInfo LLVMSparcAsmPrinter LLVMSparcCodeGen LLVMSparcInfo LLVMSupport LLVMSystem LLVMSystemZAsmPrinter LLVMSystemZCodeGen LLVMSystemZInfo LLVMX86AsmParser LLVMX86CodeGen LLVMX86Disassembler LLVMX86Info LLVMXCoreAsmPrinter LLVMXCoreCodeGen LLVMXCoreInfo)
+set(MSVC_LIB_DEPS_LLVMMCParser LLVMMC LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsCodeGen LLVMMipsInfo LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMipsCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMMipsInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMipsInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMPIC16AsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPIC16CodeGen LLVMPIC16Info LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMPIC16CodeGen LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMPIC16Info LLVMSelectionDAG LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMPIC16Info LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMInstCombine LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
+set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSparcInfo LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSparcInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMSystem )
+set(MSVC_LIB_DEPS_LLVMSystemZAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystemZInfo LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSystemZCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystemZInfo LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSystemZInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMTransformUtils LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMipa)
+set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMMCParser LLVMSupport LLVMTarget LLVMX86Info)
+set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMMC LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86AsmPrinter LLVMX86Info)
+set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMMC LLVMSupport LLVMX86Info)
+set(MSVC_LIB_DEPS_LLVMX86Info LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMXCoreAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget LLVMXCoreInfo)
+set(MSVC_LIB_DEPS_LLVMXCoreCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMXCoreInfo)
+set(MSVC_LIB_DEPS_LLVMXCoreInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMipa LLVMAnalysis LLVMCore LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMipo LLVMAnalysis LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)

Modified: llvm/trunk/examples/BrainF/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/BrainF/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/examples/BrainF/CMakeLists.txt (original)
+++ llvm/trunk/examples/BrainF/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,7 +1,6 @@
+set(LLVM_LINK_COMPONENTS jit bitwriter nativecodegen interpreter)
+
 add_llvm_example(BrainF
   BrainF.cpp
   BrainFDriver.cpp
   )
-
-add_llvm_link_components(BrainF jit nativecodegen interpreter)
-target_link_libraries(BrainF LLVMBitWriter)

Modified: llvm/trunk/examples/ExceptionDemo/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/ExceptionDemo/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/examples/ExceptionDemo/CMakeLists.txt (original)
+++ llvm/trunk/examples/ExceptionDemo/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,5 +1,5 @@
+set(LLVM_LINK_COMPONENTS jit nativecodegen)
+
 add_llvm_example(ExceptionDemo
   ExceptionDemo.cpp
   )
-
-add_llvm_link_components(ExceptionDemo jit nativecodegen)

Modified: llvm/trunk/examples/Fibonacci/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Fibonacci/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/examples/Fibonacci/CMakeLists.txt (original)
+++ llvm/trunk/examples/Fibonacci/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,5 +1,5 @@
+set(LLVM_LINK_COMPONENTS jit interpreter nativecodegen)
+
 add_llvm_example(Fibonacci
   fibonacci.cpp
   )
-
-add_llvm_link_components(Fibonacci jit interpreter nativecodegen)

Modified: llvm/trunk/examples/HowToUseJIT/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/HowToUseJIT/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/examples/HowToUseJIT/CMakeLists.txt (original)
+++ llvm/trunk/examples/HowToUseJIT/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,5 +1,5 @@
+set(LLVM_LINK_COMPONENTS jit interpreter nativecodegen)
+
 add_llvm_example(HowToUseJIT
   HowToUseJIT.cpp
   )
-
-add_llvm_link_components(HowToUseJIT jit interpreter nativecodegen)

Modified: llvm/trunk/examples/Kaleidoscope/Chapter3/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter3/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter3/CMakeLists.txt (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter3/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,5 +1,5 @@
+set(LLVM_LINK_COMPONENTS core)
+
 add_llvm_example(Kaleidoscope-Ch3
   toy.cpp
   )
-
-target_link_libraries(Kaleidoscope-Ch3 LLVMCore)

Modified: llvm/trunk/examples/Kaleidoscope/Chapter4/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter4/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter4/CMakeLists.txt (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter4/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,6 +1,5 @@
+set(LLVM_LINK_COMPONENTS core jit interpreter native)
+
 add_llvm_example(Kaleidoscope-Ch4
   toy.cpp
   )
-
-add_llvm_link_components(Kaleidoscope-Ch4 jit interpreter native)
-target_link_libraries(Kaleidoscope-Ch4 LLVMCore)

Modified: llvm/trunk/examples/Kaleidoscope/Chapter5/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter5/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter5/CMakeLists.txt (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter5/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,6 +1,5 @@
+set(LLVM_LINK_COMPONENTS core jit interpreter native)
+
 add_llvm_example(Kaleidoscope-Ch5
   toy.cpp
   )
-
-add_llvm_link_components(Kaleidoscope-Ch5 jit interpreter native)
-target_link_libraries(Kaleidoscope-Ch5 LLVMCore)

Modified: llvm/trunk/examples/Kaleidoscope/Chapter6/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter6/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter6/CMakeLists.txt (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter6/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,6 +1,5 @@
+set(LLVM_LINK_COMPONENTS core jit interpreter native)
+
 add_llvm_example(Kaleidoscope-Ch6
   toy.cpp
   )
-
-add_llvm_link_components(Kaleidoscope-Ch6 jit interpreter native)
-target_link_libraries(Kaleidoscope-Ch6 LLVMCore)

Modified: llvm/trunk/examples/Kaleidoscope/Chapter7/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter7/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter7/CMakeLists.txt (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter7/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,6 +1,5 @@
+set(LLVM_LINK_COMPONENTS core jit interpreter native)
+
 add_llvm_example(Kaleidoscope-Ch7
   toy.cpp
   )
-
-add_llvm_link_components(Kaleidoscope-Ch7 jit interpreter native)
-target_link_libraries(Kaleidoscope-Ch7 LLVMCore)

Modified: llvm/trunk/examples/ModuleMaker/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/ModuleMaker/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/examples/ModuleMaker/CMakeLists.txt (original)
+++ llvm/trunk/examples/ModuleMaker/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,5 +1,5 @@
+set(LLVM_LINK_COMPONENTS bitwriter)
+
 add_llvm_example(ModuleMaker
   ModuleMaker.cpp
   )
-
-target_link_libraries(ModuleMaker LLVMBitWriter LLVMCore)

Modified: llvm/trunk/examples/ParallelJIT/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/ParallelJIT/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/examples/ParallelJIT/CMakeLists.txt (original)
+++ llvm/trunk/examples/ParallelJIT/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,9 +1,9 @@
+set(LLVM_LINK_COMPONENTS jit interpreter nativecodegen)
+
 add_llvm_example(ParallelJIT
   ParallelJIT.cpp
   )
 
-add_llvm_link_components(ParallelJIT jit interpreter nativecodegen)
-
 if(HAVE_LIBPTHREAD)
   target_link_libraries(ParallelJIT pthread)
 endif(HAVE_LIBPTHREAD)

Modified: llvm/trunk/lib/Analysis/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/CMakeLists.txt (original)
+++ llvm/trunk/lib/Analysis/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -50,4 +50,4 @@
   ValueTracking.cpp
   )
 
-target_link_libraries(LLVMAnalysis LLVMCore LLVMTarget)
+target_link_libraries (LLVMAnalysis LLVMSupport)

Modified: llvm/trunk/lib/Analysis/IPA/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/IPA/CMakeLists.txt (original)
+++ llvm/trunk/lib/Analysis/IPA/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -4,5 +4,3 @@
   FindUsedTypes.cpp
   GlobalsModRef.cpp
   )
-
-target_link_libraries(LLVMipa LLVMAnalysis LLVMCore)

Modified: llvm/trunk/lib/Archive/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Archive/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Archive/CMakeLists.txt (original)
+++ llvm/trunk/lib/Archive/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -3,5 +3,3 @@
   ArchiveReader.cpp
   ArchiveWriter.cpp
   )
-
-target_link_libraries(LLVMArchive LLVMBitReader LLVMCore)

Modified: llvm/trunk/lib/AsmParser/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/CMakeLists.txt (original)
+++ llvm/trunk/lib/AsmParser/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -4,5 +4,3 @@
   LLParser.cpp
   Parser.cpp
   )
-
-target_link_libraries(LLVMAsmParser LLVMCore)

Modified: llvm/trunk/lib/Bitcode/Reader/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/CMakeLists.txt (original)
+++ llvm/trunk/lib/Bitcode/Reader/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -2,5 +2,3 @@
   BitReader.cpp
   BitcodeReader.cpp
   )
-
-target_link_libraries(LLVMBitReader LLVMCore)

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -8,11 +8,4 @@
   OcamlGCPrinter.cpp
   )
 
-target_link_libraries (LLVMAsmPrinter
-  LLVMAnalysis
-  LLVMCodeGen
-  LLVMCore
-  LLVMMC
-  LLVMMCParser
-  LLVMTarget
-  )
+target_link_libraries (LLVMAsmPrinter LLVMMCParser)

Modified: llvm/trunk/lib/CodeGen/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/CMakeLists.txt (original)
+++ llvm/trunk/lib/CodeGen/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -83,11 +83,4 @@
   VirtRegRewriter.cpp
   )
 
-target_link_libraries (LLVMCodeGen
-  LLVMAnalysis
-  LLVMCore
-  LLVMMC
-  LLVMScalarOpts
-  LLVMTarget
-  LLVMTransformUtils
-  )
+target_link_libraries (LLVMCodeGen LLVMCore LLVMScalarOpts)

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/CMakeLists.txt (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -22,10 +22,4 @@
   TargetSelectionDAGInfo.cpp
   )
 
-target_link_libraries(LLVMSelectionDAG
-  LLVMAnalysis
-  LLVMCodeGen
-  LLVMCore
-  LLVMMC
-  LLVMTarget
-  )
+target_link_libraries (LLVMSelectionDAG LLVMAnalysis LLVMAsmPrinter LLVMCodeGen)

Modified: llvm/trunk/lib/CompilerDriver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CompilerDriver/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/CompilerDriver/CMakeLists.txt (original)
+++ llvm/trunk/lib/CompilerDriver/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,3 +1,4 @@
+set(LLVM_LINK_COMPONENTS support system)
 set(LLVM_REQUIRES_EH 1)
 
 add_llvm_tool(llvmc

Modified: llvm/trunk/lib/ExecutionEngine/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/CMakeLists.txt (original)
+++ llvm/trunk/lib/ExecutionEngine/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -2,5 +2,3 @@
   ExecutionEngine.cpp
   ExecutionEngineBindings.cpp
   )
-
-target_link_libraries(LLVMExecutionEngine LLVMCore LLVMTarget)

Modified: llvm/trunk/lib/ExecutionEngine/Interpreter/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Interpreter/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Interpreter/CMakeLists.txt (original)
+++ llvm/trunk/lib/ExecutionEngine/Interpreter/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -3,10 +3,3 @@
   ExternalFunctions.cpp
   Interpreter.cpp
   )
-
-target_link_libraries(LLVMInterpreter
-  LLVMCodeGen
-  LLVMCore
-  LLVMExecutionEngine
-  LLVMTarget
-  )

Modified: llvm/trunk/lib/ExecutionEngine/JIT/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JIT/CMakeLists.txt (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -11,11 +11,3 @@
   OProfileJITEventListener.cpp
   TargetSelect.cpp
   )
-
-target_link_libraries(LLVMJIT
-  LLVMCodeGen
-  LLVMCore
-  LLVMExecutionEngine
-  LLVMMC
-  LLVMTarget
-  )

Modified: llvm/trunk/lib/Linker/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/CMakeLists.txt (original)
+++ llvm/trunk/lib/Linker/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -4,10 +4,3 @@
   LinkModules.cpp
   Linker.cpp
   )
-
-target_link_libraries(LLVMLinker
-  LLVMArchive
-  LLVMBitReader
-  LLVMCore
-  LLVMTransformUtils
-  )

Modified: llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt (original)
+++ llvm/trunk/lib/MC/MCDisassembler/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,8 +1,7 @@
+
 add_llvm_library(LLVMMCDisassembler
   EDDisassembler.cpp
   EDOperand.cpp
   EDInst.cpp
   EDToken.cpp
   )
-
-add_llvm_link_components(LLVMMCDisassembler all)

Modified: llvm/trunk/lib/Target/ARM/AsmParser/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/CMakeLists.txt (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -5,9 +5,3 @@
   ARMAsmParser.cpp
   )
 
-target_link_libraries(LLVMARMAsmParser
-  LLVMARMInfo
-  LLVMMC
-  LLVMMCParser
-  LLVMTarget
-  )

Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmPrinter/CMakeLists.txt (original)
+++ llvm/trunk/lib/Target/ARM/AsmPrinter/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -3,6 +3,4 @@
 add_llvm_library(LLVMARMAsmPrinter
   ARMInstPrinter.cpp
   )
-
 add_dependencies(LLVMARMAsmPrinter ARMCodeGenTable_gen)
-target_link_libraries(LLVMARMAsmPrinter LLVMMC)

Modified: llvm/trunk/lib/Target/ARM/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/CMakeLists.txt (original)
+++ llvm/trunk/lib/Target/ARM/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -46,13 +46,4 @@
   Thumb2SizeReduction.cpp
   )
 
-target_link_libraries (LLVMARMCodeGen
-  LLVMARMInfo
-  LLVMAnalysis
-  LLVMAsmPrinter
-  LLVMCodeGen
-  LLVMCore
-  LLVMMC
-  LLVMSelectionDAG
-  LLVMTarget
-  )
+target_link_libraries (LLVMARMCodeGen LLVMARMAsmPrinter LLVMSelectionDAG)

Modified: llvm/trunk/lib/Target/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CMakeLists.txt (original)
+++ llvm/trunk/lib/Target/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -13,5 +13,3 @@
   TargetRegisterInfo.cpp
   TargetSubtarget.cpp
   )
-
-target_link_libraries(LLVMTarget LLVMCore LLVMMC)

Modified: llvm/trunk/lib/Target/X86/AsmParser/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/CMakeLists.txt (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -4,11 +4,4 @@
   X86AsmLexer.cpp
   X86AsmParser.cpp
   )
-
 add_dependencies(LLVMX86AsmParser X86CodeGenTable_gen)
-target_link_libraries(LLVMX86AsmParser
-  LLVMMC
-  LLVMMCParser
-  LLVMTarget
-  LLVMX86Info
-  )

Modified: llvm/trunk/lib/Target/X86/AsmPrinter/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/CMakeLists.txt (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -5,6 +5,4 @@
   X86IntelInstPrinter.cpp
   X86InstComments.cpp
   )
-
 add_dependencies(LLVMX86AsmPrinter X86CodeGenTable_gen)
-target_link_libraries(LLVMX86AsmPrinter LLVMMC)

Modified: llvm/trunk/lib/Target/X86/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/CMakeLists.txt (original)
+++ llvm/trunk/lib/Target/X86/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -29,7 +29,7 @@
   X86InstrInfo.cpp
   X86JITInfo.cpp
   X86MCAsmInfo.cpp
-  X86MCCodeEmitter.cpp
+  X86MCCodeEmitter.cpp 
   X86MCInstLower.cpp
   X86RegisterInfo.cpp
   X86SelectionDAGInfo.cpp
@@ -49,14 +49,4 @@
 endif()
 
 add_llvm_target(X86CodeGen ${sources})
-target_link_libraries(LLVMX86CodeGen
-  LLVMAnalysis
-  LLVMAsmPrinter
-  LLVMCodeGen
-  LLVMCore
-  LLVMMC
-  LLVMSelectionDAG
-  LLVMTarget
-  LLVMX86AsmPrinter
-  LLVMX86Info
-  )
+

Modified: llvm/trunk/lib/Target/X86/Disassembler/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/Disassembler/CMakeLists.txt (original)
+++ llvm/trunk/lib/Target/X86/Disassembler/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -11,6 +11,4 @@
   PROPERTY COMPILE_FLAGS "/Od"
   )
 endif()
-
 add_dependencies(LLVMX86Disassembler X86CodeGenTable_gen)
-target_link_libraries(LLVMX86Disassembler LLVMMC LLVMX86Info)

Modified: llvm/trunk/lib/Transforms/IPO/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/CMakeLists.txt (original)
+++ llvm/trunk/lib/Transforms/IPO/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -24,11 +24,4 @@
   StructRetPromotion.cpp
   )
 
-target_link_libraries(LLVMipo
-  LLVMAnalysis
-  LLVMCore
-  LLVMScalarOpts
-  LLVMTarget
-  LLVMTransformUtils
-  LLVMipa
-  )
+target_link_libraries (LLVMipo LLVMScalarOpts LLVMInstCombine)

Modified: llvm/trunk/lib/Transforms/InstCombine/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/CMakeLists.txt (original)
+++ llvm/trunk/lib/Transforms/InstCombine/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -9,14 +9,9 @@
   InstCombineMulDivRem.cpp
   InstCombinePHI.cpp
   InstCombineSelect.cpp
-  InstCombineShifts.cpp
+  InstCombineShifts.cpp 
   InstCombineSimplifyDemanded.cpp
   InstCombineVectorOps.cpp
   )
 
-target_link_libraries(LLVMInstCombine
-  LLVMAnalysis
-  LLVMCore
-  LLVMTarget
-  LLVMTransformUtils
-  )
+target_link_libraries (LLVMInstCombine LLVMTransformUtils)

Modified: llvm/trunk/lib/Transforms/Instrumentation/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/CMakeLists.txt (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -3,9 +3,3 @@
   OptimalEdgeProfiling.cpp
   ProfilingUtils.cpp
   )
-
-target_link_libraries(LLVMInstrumentation
-  LLVMAnalysis
-  LLVMCore
-  LLVMTransformUtils
-  )

Modified: llvm/trunk/lib/Transforms/Scalar/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CMakeLists.txt (original)
+++ llvm/trunk/lib/Transforms/Scalar/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -32,10 +32,4 @@
   TailRecursionElimination.cpp
   )
 
-target_link_libraries (LLVMScalarOpts
-  LLVMAnalysis
-  LLVMCore
-  LLVMInstCombine
-  LLVMTarget
-  LLVMTransformUtils
-  )
+target_link_libraries (LLVMScalarOpts LLVMTransformUtils)

Modified: llvm/trunk/lib/Transforms/Utils/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/CMakeLists.txt (original)
+++ llvm/trunk/lib/Transforms/Utils/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -25,9 +25,4 @@
   ValueMapper.cpp
   )
 
-target_link_libraries(LLVMTransformUtils
-  LLVMAnalysis
-  LLVMCore
-  LLVMTarget
-  LLVMipa
-  )
+target_link_libraries (LLVMTransformUtils LLVMSupport)

Modified: llvm/trunk/tools/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/CMakeLists.txt (original)
+++ llvm/trunk/tools/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -2,6 +2,15 @@
 # large and three small executables. This is done to minimize memory load
 # in parallel builds.  Please retain this ordering.
 
+if( NOT WIN32 OR MSYS OR CYGWIN )
+  # It is useful to build llvm-config before the other tools, so we
+  # have a fresh LibDeps.txt for regenerating the hard-coded library
+  # dependencies. llvm-config/CMakeLists.txt takes care of this but we
+  # must keep llvm-config as the first entry on the list of tools to
+  # be built.
+  add_subdirectory(llvm-config)
+endif()
+
 add_subdirectory(opt)
 add_subdirectory(llvm-as)
 add_subdirectory(llvm-dis)
@@ -29,4 +38,6 @@
 
 if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt )
   add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/clang )
-endif()
+endif( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt )
+
+set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)

Modified: llvm/trunk/tools/bugpoint/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/CMakeLists.txt (original)
+++ llvm/trunk/tools/bugpoint/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,3 +1,6 @@
+set(LLVM_LINK_COMPONENTS asmparser instrumentation scalaropts ipo
+  linker bitreader bitwriter)
+
 add_llvm_tool(bugpoint
   BugDriver.cpp
   CrashDebugger.cpp
@@ -9,13 +12,3 @@
   ToolRunner.cpp
   bugpoint.cpp
   )
-
-target_link_libraries(bugpoint
-  LLVMAsmParser
-  LLVMInstrumentation
-  LLVMScalarOpts
-  LLVMipo
-  LLVMLinker
-  LLVMBitReader
-  LLVMBitWriter
-  )

Modified: llvm/trunk/tools/llc/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/llc/CMakeLists.txt (original)
+++ llvm/trunk/tools/llc/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,6 +1,5 @@
+set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} bitreader asmparser)
+
 add_llvm_tool(llc
   llc.cpp
   )
-
-add_llvm_link_components(llc all)
-target_link_libraries(llc LLVMBitReader LLVMAsmParser)

Modified: llvm/trunk/tools/lli/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/lli/CMakeLists.txt (original)
+++ llvm/trunk/tools/lli/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,6 +1,5 @@
+set(LLVM_LINK_COMPONENTS jit interpreter nativecodegen bitreader selectiondag)
+
 add_llvm_tool(lli
   lli.cpp
   )
-
-add_llvm_link_components(lli jit interpreter nativecodegen)
-target_link_libraries(lli LLVMBitReader LLVMSelectionDAG)

Modified: llvm/trunk/tools/llvm-ar/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ar/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ar/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-ar/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,9 +1,8 @@
+set(LLVM_LINK_COMPONENTS archive)
 set(LLVM_REQUIRES_EH 1)
 
 add_llvm_tool(llvm-ar
   llvm-ar.cpp
   )
 
-target_link_libraries(llvm-ar LLVMArchive)
-
 # TODO: Support check-local.

Modified: llvm/trunk/tools/llvm-as/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-as/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-as/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-as/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,7 +1,6 @@
+set(LLVM_LINK_COMPONENTS asmparser bitwriter)
 set(LLVM_REQUIRES_EH 1)
 
 add_llvm_tool(llvm-as
   llvm-as.cpp
   )
-
-target_link_libraries(llvm-as LLVMAsmParser LLVMBitWriter)

Modified: llvm/trunk/tools/llvm-bcanalyzer/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-bcanalyzer/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-bcanalyzer/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-bcanalyzer/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,7 +1,6 @@
+set(LLVM_LINK_COMPONENTS bitreader)
 set(LLVM_REQUIRES_EH 1)
 
 add_llvm_tool(llvm-bcanalyzer
   llvm-bcanalyzer.cpp
   )
-
-target_link_libraries(llvm-bcanalyzer LLVMBitReader)

Modified: llvm/trunk/tools/llvm-config/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-config/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-config/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-config/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -110,6 +110,10 @@
 
 add_dependencies(llvm-config.target ${llvm_lib_targets})
 
+# Make sure that llvm-config builds before the llvm tools, so we have
+# LibDeps.txt and can use it for updating the hard-coded library
+# dependencies on cmake/modules/LLVMLibDeps.cmake when the tools'
+# build fail due to outdated dependencies:
 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} llvm-config.target)
 
 install(FILES ${LLVM_CONFIG}
@@ -118,4 +122,25 @@
   DESTINATION bin)
 
 
+# Regeneration of library dependencies.
+
+# See the comments at the end of cmake/modules/LLVMConfig.cmake for
+# notes and guidelines.
+
+set(LLVMLibDeps ${LLVM_MAIN_SRC_DIR}/cmake/modules/LLVMLibDeps.cmake)
+set(LLVMLibDeps_TMP ${CMAKE_CURRENT_BINARY_DIR}/LLVMLibDeps.cmake.tmp)
+
+add_custom_command(OUTPUT ${LLVMLibDeps_TMP}
+  COMMAND sed -e s'@\\.a@@g' -e s'@\\.so@@g' -e 's at libLLVM@LLVM at g' -e 's@: @ @' -e 's@\\\(.*\\\)@set\(MSVC_LIB_DEPS_\\1\)@' ${FINAL_LIBDEPS} > ${LLVMLibDeps_TMP}
+  COMMAND ${CMAKE_COMMAND} -E copy_if_different ${LLVMLibDeps_TMP} ${LLVMLibDeps}
+  DEPENDS ${FINAL_LIBDEPS}
+  COMMENT "Updating cmake library dependencies file ${LLVMLibDeps}"
+  )
+
+if( LLVM_TARGETS_TO_BUILD STREQUAL LLVM_ALL_TARGETS )
+  add_custom_target(llvmlibdeps.target ALL DEPENDS ${LLVMLibDeps_TMP})
+  add_dependencies(llvmlibdeps.target llvm-config.target)
+  set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} llvmlibdeps.target)
+endif()
+
 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)

Modified: llvm/trunk/tools/llvm-diff/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-diff/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-diff/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-diff/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,6 +1,6 @@
+set(LLVM_LINK_COMPONENTS support asmparser bitreader)
+
 add_llvm_tool(llvm-diff
   llvm-diff.cpp
   DifferenceEngine.cpp
   )
-
-target_link_libraries(llvm-diff LLVMAsmParser LLVMBitReader)

Modified: llvm/trunk/tools/llvm-dis/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-dis/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-dis/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-dis/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,7 +1,6 @@
+set(LLVM_LINK_COMPONENTS bitreader)
 set(LLVM_REQUIRES_EH 1)
 
 add_llvm_tool(llvm-dis
   llvm-dis.cpp
   )
-
-target_link_libraries(llvm-dis LLVMCore LLVMBitReader)

Modified: llvm/trunk/tools/llvm-extract/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-extract/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-extract/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-extract/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,10 +1,5 @@
+set(LLVM_LINK_COMPONENTS asmparser ipo bitreader bitwriter)
+
 add_llvm_tool(llvm-extract
   llvm-extract.cpp
   )
-
-target_link_libraries(llvm-extract
-  LLVMAsmParser
-  LLVMipo
-  LLVMBitReader
-  LLVMBitWriter
-  )

Modified: llvm/trunk/tools/llvm-ld/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ld/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ld/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-ld/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,12 +1,6 @@
+set(LLVM_LINK_COMPONENTS ipo scalaropts linker archive bitwriter)
+
 add_llvm_tool(llvm-ld
   Optimize.cpp
   llvm-ld.cpp
   )
-
-target_link_libraries(llvm-ld
-  LLVMipo
-  LLVMScalarOpts
-  LLVMLinker
-  LLVMArchive
-  LLVMBitWriter
-  )

Modified: llvm/trunk/tools/llvm-link/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-link/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-link/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-link/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,10 +1,5 @@
+set(LLVM_LINK_COMPONENTS linker bitreader bitwriter asmparser)
+
 add_llvm_tool(llvm-link
   llvm-link.cpp
   )
-
-target_link_libraries(llvm-link
-  LLVMLinker
-  LLVMBitReader
-  LLVMBitWriter
-  LLVMAsmParser
-  )

Modified: llvm/trunk/tools/llvm-mc/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mc/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-mc/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,7 +1,6 @@
+set(LLVM_LINK_COMPONENTS ${LLVM_TARGETS_TO_BUILD} support MC MCParser MCDisassembler)
+
 add_llvm_tool(llvm-mc
   llvm-mc.cpp
   Disassembler.cpp
   )
-
-add_llvm_link_components(llvm-mc all)
-target_link_libraries(llvm-mc LLVMMC LLVMMCParser LLVMMCDisassembler)

Modified: llvm/trunk/tools/llvm-nm/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-nm/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-nm/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-nm/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,5 +1,5 @@
+set(LLVM_LINK_COMPONENTS archive bitreader)
+
 add_llvm_tool(llvm-nm
   llvm-nm.cpp
   )
-
-target_link_libraries(llvm-nm LLVMArchive LLVMBitReader)

Modified: llvm/trunk/tools/llvm-prof/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-prof/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-prof/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-prof/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,5 +1,5 @@
+set(LLVM_LINK_COMPONENTS bitreader analysis)
+
 add_llvm_tool(llvm-prof
   llvm-prof.cpp
   )
-
-target_link_libraries(llvm-prof LLVMBitReader LLVMAnalysis)

Modified: llvm/trunk/tools/llvm-ranlib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ranlib/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ranlib/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-ranlib/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,7 +1,6 @@
+set(LLVM_LINK_COMPONENTS archive)
 set(LLVM_REQUIRES_EH 1)
 
 add_llvm_tool(llvm-ranlib
   llvm-ranlib.cpp
   )
-
-target_link_libraries(llvm-ranlib LLVMArchive)

Modified: llvm/trunk/tools/opt/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/CMakeLists.txt?rev=113819&r1=113818&r2=113819&view=diff
==============================================================================
--- llvm/trunk/tools/opt/CMakeLists.txt (original)
+++ llvm/trunk/tools/opt/CMakeLists.txt Mon Sep 13 18:59:48 2010
@@ -1,15 +1,8 @@
+set(LLVM_LINK_COMPONENTS bitreader asmparser bitwriter instrumentation scalaropts ipo)
+
 add_llvm_tool(opt
   AnalysisWrappers.cpp
   GraphPrinters.cpp
   PrintSCC.cpp
   opt.cpp
   )
-
-target_link_libraries(opt
-  LLVMBitReader
-  LLVMAsmParser
-  LLVMBitWriter
-  LLVMInstrumentation
-  LLVMScalarOpts
-  LLVMipo
-  )





More information about the llvm-commits mailing list