[cfe-commits] r113817 - in /cfe/trunk: ./ examples/PrintFunctionNames/ examples/clang-interpreter/ examples/wpa/ lib/AST/ lib/Analysis/ lib/Basic/ lib/Checker/ lib/CodeGen/ lib/Driver/ lib/Frontend/ lib/FrontendTool/ lib/Index/ lib/Lex/ lib/Parse/ lib/Rewrite/ lib/Sema/ lib/Serialization/ tools/c-index-test/ tools/driver/ tools/libclang/

Michael J. Spencer bigcheesegs at gmail.com
Mon Sep 13 16:54:41 PDT 2010


Author: mspencer
Date: Mon Sep 13 18:54:41 2010
New Revision: 113817

URL: http://llvm.org/viewvc/llvm-project?rev=113817&view=rev
Log:
Revert "CMake: Update to use standard CMake dependency tracking facilities instead"

This reverts commit r113631

Conflicts:

	CMakeLists.txt
	lib/CodeGen/CMakeLists.txt

Modified:
    cfe/trunk/CMakeLists.txt
    cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt
    cfe/trunk/examples/clang-interpreter/CMakeLists.txt
    cfe/trunk/examples/wpa/CMakeLists.txt
    cfe/trunk/lib/AST/CMakeLists.txt
    cfe/trunk/lib/Analysis/CMakeLists.txt
    cfe/trunk/lib/Basic/CMakeLists.txt
    cfe/trunk/lib/Checker/CMakeLists.txt
    cfe/trunk/lib/CodeGen/CMakeLists.txt
    cfe/trunk/lib/Driver/CMakeLists.txt
    cfe/trunk/lib/Frontend/CMakeLists.txt
    cfe/trunk/lib/FrontendTool/CMakeLists.txt
    cfe/trunk/lib/Index/CMakeLists.txt
    cfe/trunk/lib/Lex/CMakeLists.txt
    cfe/trunk/lib/Parse/CMakeLists.txt
    cfe/trunk/lib/Rewrite/CMakeLists.txt
    cfe/trunk/lib/Sema/CMakeLists.txt
    cfe/trunk/lib/Serialization/CMakeLists.txt
    cfe/trunk/tools/c-index-test/CMakeLists.txt
    cfe/trunk/tools/driver/CMakeLists.txt
    cfe/trunk/tools/libclang/CMakeLists.txt

Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -107,7 +107,6 @@
     set_target_properties(${name} PROPERTIES COMPILE_FLAGS ${cflag})
   endif(MSVC)
   install(TARGETS ${name}
-    EXPORT LLVM
     LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
     ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
 endmacro(add_clang_library)

Modified: cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt (original)
+++ cfe/trunk/examples/PrintFunctionNames/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -2,16 +2,7 @@
 
 set(LLVM_NO_RTTI 1)
 
-add_clang_library(PrintFunctionNames
-  PrintFunctionNames.cpp
-  )
-
-target_link_libraries(PrintFunctionNames
-  clangAST
-  clangFrontend
-  clangBasic
-  )
-
+add_clang_library(PrintFunctionNames PrintFunctionNames.cpp)
 
 set_target_properties(PrintFunctionNames
   PROPERTIES

Modified: cfe/trunk/examples/clang-interpreter/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/clang-interpreter/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/examples/clang-interpreter/CMakeLists.txt (original)
+++ cfe/trunk/examples/clang-interpreter/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -1,24 +1,34 @@
 set(LLVM_NO_RTTI 1)
 
-add_clang_executable(clang-interpreter
-  main.cpp
-  )
+set(LLVM_USED_LIBS
+    clangFrontend
+    clangSerialization
+    clangDriver
+    clangCodeGen
+    clangSema
+    clangChecker
+    clangIndex
+    clangAnalysis
+    clangRewrite
+    clangAST
+    clangParse
+    clangLex
+    clangBasic
+    )
 
-add_llvm_link_components(clang-interpreter jit interpreter nativecodegen)
-target_link_libraries(clang-interpreter
-  clangFrontend
-  clangSerialization
-  clangDriver
-  clangCodeGen
-  clangSema
-  clangChecker
-  clangIndex
-  clangAnalysis
-  clangRewrite
-  clangAST
-  clangParse
-  clangLex
-  clangBasic
+set(LLVM_LINK_COMPONENTS
+    jit
+    interpreter
+    nativecodegen
+    asmparser
+    bitreader
+    bitwriter
+    codegen
+    ipo
+    selectiondag
   )
 
+add_clang_executable(clang-interpreter
+  main.cpp
+  )
 add_dependencies(clang-interpreter clang-headers)

Modified: cfe/trunk/examples/wpa/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/examples/wpa/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/examples/wpa/CMakeLists.txt (original)
+++ cfe/trunk/examples/wpa/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -1,10 +1,6 @@
 set(LLVM_NO_RTTI 1)
 
-add_clang_executable(clang-wpa
-  clang-wpa.cpp
-  )
-
-target_link_libraries(clang-wpa
+set(LLVM_USED_LIBS
   clangIndex
   clangFrontend
   clangDriver
@@ -16,9 +12,15 @@
   clangAST
   clangParse
   clangLex
-  clangBasic
+  clangBasic)
+
+set( LLVM_LINK_COMPONENTS
+  bitreader
+  mc
+  core
   )
 
-add_dependencies(clang-wpa
-  clang-headers
+add_clang_executable(clang-wpa
+  clang-wpa.cpp
   )
+add_dependencies(clang-wpa clang-headers)

Modified: cfe/trunk/lib/AST/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/lib/AST/CMakeLists.txt (original)
+++ cfe/trunk/lib/AST/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -1,5 +1,7 @@
 set(LLVM_NO_RTTI 1)
 
+set(LLVM_USED_LIBS clangBasic)
+
 add_clang_library(clangAST
   APValue.cpp
   ASTConsumer.cpp
@@ -42,16 +44,5 @@
   TypePrinter.cpp
   )
 
-target_link_libraries(clangAST
-  clangBasic
-  )
-
-add_dependencies(clangAST
-  ClangARMNeon
-  ClangAttrClasses
-  ClangAttrList
-  ClangAttrImpl
-  ClangDiagnosticAST
-  ClangDeclNodes
-  ClangStmtNodes
-  )
+add_dependencies(clangAST ClangARMNeon ClangAttrClasses ClangAttrList 
+                 ClangAttrImpl ClangDiagnosticAST ClangDeclNodes ClangStmtNodes)

Modified: cfe/trunk/lib/Analysis/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CMakeLists.txt (original)
+++ cfe/trunk/lib/Analysis/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -1,5 +1,7 @@
 set(LLVM_NO_RTTI 1)
 
+set(LLVM_USED_LIBS clangBasic clangAST clangIndex)
+
 add_clang_library(clangAnalysis
   AnalysisContext.cpp
   CFG.cpp
@@ -13,16 +15,5 @@
   UninitializedValues.cpp
   )
 
-target_link_libraries(clangAnalysis
-  clangBasic
-  clangAST
-  clangIndex
-  )
-
-add_dependencies(clangAnalysis
-  ClangAttrClasses
-  ClangAttrList
-  ClangDiagnosticAnalysis
-  ClangDeclNodes
-  ClangStmtNodes
-  )
+add_dependencies(clangAnalysis ClangAttrClasses ClangAttrList
+                 ClangDiagnosticAnalysis ClangDeclNodes ClangStmtNodes)

Modified: cfe/trunk/lib/Basic/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/CMakeLists.txt (original)
+++ cfe/trunk/lib/Basic/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -14,10 +14,6 @@
   Version.cpp
   )
 
-target_link_libraries(clangBasic
-  LLVMMC
-  )
-
 # Determine Subversion revision.
 # FIXME: This only gets updated when CMake is run, so this revision number
 # may be out-of-date!
@@ -28,17 +24,16 @@
     PROPERTIES COMPILE_DEFINITIONS "SVN_REVISION=\"${CLANG_WC_REVISION}\"")
 endif()
 
-add_dependencies(clangBasic
-  ClangARMNeon
-  ClangAttrList
-  ClangDiagnosticAnalysis
-  ClangDiagnosticAST
-  ClangDiagnosticCommon
-  ClangDiagnosticDriver
-  ClangDiagnosticFrontend
-  ClangDiagnosticGroups
-  ClangDiagnosticLex
-  ClangDiagnosticParse
-  ClangDiagnosticSema
-  )
-
+add_dependencies(clangBasic 
+                 ClangARMNeon
+                 ClangAttrList
+                 ClangDiagnosticAnalysis
+                 ClangDiagnosticAST
+                 ClangDiagnosticCommon
+                 ClangDiagnosticDriver
+                 ClangDiagnosticFrontend
+                 ClangDiagnosticGroups
+                 ClangDiagnosticLex
+                 ClangDiagnosticParse
+                 ClangDiagnosticSema)
+                 

Modified: cfe/trunk/lib/Checker/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/CMakeLists.txt (original)
+++ cfe/trunk/lib/Checker/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -1,5 +1,7 @@
 set(LLVM_NO_RTTI 1)
 
+set(LLVM_USED_LIBS clangBasic clangLex clangAST clangFrontend clangRewrite)
+
 add_clang_library(clangChecker
   AdjustedReturnValueChecker.cpp
   AggExprVisitor.cpp
@@ -82,17 +84,5 @@
   ValueManager.cpp
   )
 
-target_link_libraries(clangChecker
-  clangBasic
-  clangLex
-  clangAST
-  clangFrontend
-  clangRewrite
-  )
-
-add_dependencies(clangChecker
-  ClangAttrClasses
-  ClangAttrList
-  ClangDeclNodes
-  ClangStmtNodes
-  )
+add_dependencies(clangChecker ClangAttrClasses ClangAttrList ClangDeclNodes
+                 ClangStmtNodes)

Modified: cfe/trunk/lib/CodeGen/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CMakeLists.txt (original)
+++ cfe/trunk/lib/CodeGen/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -1,5 +1,7 @@
 set(LLVM_NO_RTTI 1)
 
+set(LLVM_USED_LIBS clangBasic clangAST clangFrontend)
+
 add_clang_library(clangCodeGen
   BackendUtil.cpp
   CGBlocks.cpp
@@ -37,19 +39,5 @@
   TargetInfo.cpp
   )
 
-target_link_libraries(clangCodeGen
-  LLVMCore
-  LLVMAsmParser
-  LLVMBitReader
-  LLVMBitWriter
-  LLVMipo
-  )
-
-add_dependencies(clangCodeGen
-  ClangARMNeon
-  ClangAttrClasses
-  ClangAttrList
-  ClangDeclNodes
-  ClangStmtNodes
-  ClangDiagnosticFrontend
-  )
+add_dependencies(clangCodeGen ClangAttrClasses ClangAttrList ClangDeclNodes
+                 ClangStmtNodes)

Modified: cfe/trunk/lib/Driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/CMakeLists.txt (original)
+++ cfe/trunk/lib/Driver/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -1,5 +1,7 @@
 set(LLVM_NO_RTTI 1)
 
+set(LLVM_USED_LIBS clangBasic clangAST clangParse)
+
 add_clang_library(clangDriver
   Action.cpp
   Arg.cpp
@@ -21,16 +23,5 @@
   Types.cpp
   )
 
-target_link_libraries(clangDriver
-  clangBasic
-  clangAST
-  clangParse
-  )
-
-add_dependencies(clangDriver
-  ClangAttrList
-  ClangDiagnosticDriver
-  ClangDriverOptions
-  ClangCC1Options
-  ClangCC1AsOptions
-  )
+add_dependencies(clangDriver ClangAttrList ClangDiagnosticDriver
+                 ClangDriverOptions ClangCC1Options ClangCC1AsOptions)

Modified: cfe/trunk/lib/Frontend/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CMakeLists.txt (original)
+++ cfe/trunk/lib/Frontend/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -1,5 +1,14 @@
 set(LLVM_NO_RTTI 1)
 
+set( LLVM_USED_LIBS
+  clangDriver
+  clangParse
+  clangSema
+  clangAST
+  clangLex
+  clangBasic
+  )
+
 add_clang_library(clangFrontend
   ASTConsumers.cpp
   ASTMerge.cpp
@@ -27,17 +36,6 @@
   Warnings.cpp
   )
 
-target_link_libraries(clangFrontend
-  LLVMCore
-
-  clangDriver
-  clangParse
-  clangSema
-  clangAST
-  clangLex
-  clangBasic
-  )
-
 IF(MSVC)
   get_target_property(NON_ANSI_COMPILE_FLAGS clangFrontend COMPILE_FLAGS)
   string(REPLACE /Za
@@ -46,13 +44,12 @@
   set_target_properties(clangFrontend PROPERTIES COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
 ENDIF(MSVC)
 
-add_dependencies(clangFrontend
+add_dependencies(clangFrontend 
   ClangAttrClasses
   ClangAttrList
   ClangCC1Options
-  ClangDiagnosticFrontend
+  ClangDiagnosticFrontend 
   ClangDiagnosticLex
   ClangDiagnosticSema
   ClangDeclNodes
-  ClangStmtNodes
-  )
+  ClangStmtNodes)

Modified: cfe/trunk/lib/FrontendTool/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/FrontendTool/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/lib/FrontendTool/CMakeLists.txt (original)
+++ cfe/trunk/lib/FrontendTool/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -1,13 +1,8 @@
 set(LLVM_NO_RTTI 1)
 
+set(LLVM_USED_LIBS clangDriver clangFrontend clangRewrite clangCodeGen 
+    clangChecker)
+
 add_clang_library(clangFrontendTool
   ExecuteCompilerInvocation.cpp
   )
-
-target_link_libraries(clangFrontendTool
-  clangDriver
-  clangFrontend
-  clangRewrite
-  clangCodeGen
-  clangChecker
-  )

Modified: cfe/trunk/lib/Index/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/lib/Index/CMakeLists.txt (original)
+++ cfe/trunk/lib/Index/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -1,20 +1,8 @@
 set(LLVM_NO_RTTI 1)
 
-add_clang_library(clangIndex
-  ASTLocation.cpp
-  Analyzer.cpp
-  CallGraph.cpp
-  DeclReferenceMap.cpp
-  Entity.cpp
-  GlobalSelector.cpp
-  Handlers.cpp
-  IndexProvider.cpp
-  Indexer.cpp
-  Program.cpp
-  SelectorMap.cpp
-  )
+set(LLVM_USED_LIBS clangBasic clangLex clangAST)
 
-target_link_libraries(clangIndex
+set( LLVM_USED_LIBS
   clangSerialization
   clangFrontend
   clangParse
@@ -28,9 +16,19 @@
   clangBasic
   )
 
-add_dependencies(clangIndex
-  ClangAttrClasses
-  ClangAttrList
-  ClangDeclNodes
-  ClangStmtNodes
+add_clang_library(clangIndex
+  ASTLocation.cpp
+  Analyzer.cpp
+  CallGraph.cpp
+  DeclReferenceMap.cpp
+  Entity.cpp
+  GlobalSelector.cpp
+  Handlers.cpp
+  IndexProvider.cpp
+  Indexer.cpp
+  Program.cpp
+  SelectorMap.cpp
   )
+
+add_dependencies(clangIndex ClangAttrClasses ClangAttrList
+                 ClangDeclNodes ClangStmtNodes)

Modified: cfe/trunk/lib/Lex/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/CMakeLists.txt (original)
+++ cfe/trunk/lib/Lex/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -2,6 +2,8 @@
 
 # TODO: Add -maltivec when ARCH is PowerPC.
 
+set(LLVM_USED_LIBS clangBasic)
+
 add_clang_library(clangLex
   HeaderMap.cpp
   HeaderSearch.cpp
@@ -24,10 +26,4 @@
   TokenLexer.cpp
   )
 
-target_link_libraries(clangLex
-  clangBasic
-  )
-
-add_dependencies(clangLex
-  ClangDiagnosticLex
-  )
+add_dependencies(clangLex ClangDiagnosticLex)

Modified: cfe/trunk/lib/Parse/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/CMakeLists.txt (original)
+++ cfe/trunk/lib/Parse/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -1,5 +1,7 @@
 set(LLVM_NO_RTTI 1)
 
+set(LLVM_USED_LIBS clangBasic clangAST clangLex clangSema)
+
 add_clang_library(clangParse
   ParseAST.cpp
   ParseCXXInlineMethods.cpp
@@ -16,17 +18,4 @@
   Parser.cpp
   )
 
-target_link_libraries(clangParse
-  clangBasic
-  clangAST
-  clangLex
-  clangSema
-  )
-
-add_dependencies(clangParse
-  ClangAttrClasses
-  ClangAttrList
-  ClangDeclNodes
-  ClangDiagnosticParse
-  ClangStmtNodes
-  )
+add_dependencies(clangParse ClangAttrClasses ClangAttrList ClangDeclNodes ClangDiagnosticParse ClangStmtNodes)

Modified: cfe/trunk/lib/Rewrite/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/lib/Rewrite/CMakeLists.txt (original)
+++ cfe/trunk/lib/Rewrite/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -1,5 +1,7 @@
 set(LLVM_NO_RTTI 1)
 
+set(LLVM_USED_LIBS clangBasic clangAST clangParse clangFrontend)
+
 add_clang_library(clangRewrite
   DeltaTree.cpp
   FixItRewriter.cpp
@@ -14,16 +16,8 @@
   TokenRewriter.cpp
   )
 
-target_link_libraries(clangRewrite
-  clangBasic
-  clangAST
-  clangParse
-  clangFrontend
-  )
-
 add_dependencies(clangRewrite
   ClangAttrClasses
   ClangAttrList
   ClangDeclNodes
-  ClangStmtNodes
-  )
+  ClangStmtNodes)

Modified: cfe/trunk/lib/Sema/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/CMakeLists.txt (original)
+++ cfe/trunk/lib/Sema/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -1,5 +1,7 @@
 set(LLVM_NO_RTTI 1)
 
+set(LLVM_USED_LIBS clangBasic clangAST clangLex clangAnalysis)
+
 add_clang_library(clangSema
   AnalysisBasedWarnings.cpp
   AttributeList.cpp
@@ -35,15 +37,5 @@
   TargetAttributesSema.cpp
   )
 
-target_link_libraries(clangSema
-  clangAnalysis
-  )
-
-add_dependencies(clangSema
-  ClangARMNeon
-  ClangAttrClasses
-  ClangAttrList
-  ClangDiagnosticSema
-  ClangDeclNodes
-  ClangStmtNodes
-  )
+add_dependencies(clangSema ClangARMNeon ClangAttrClasses ClangAttrList 
+                 ClangDiagnosticSema ClangDeclNodes ClangStmtNodes)

Modified: cfe/trunk/lib/Serialization/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/CMakeLists.txt (original)
+++ cfe/trunk/lib/Serialization/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -1,5 +1,7 @@
 set(LLVM_NO_RTTI 1)
 
+set(LLVM_USED_LIBS clangFrontend)
+
 add_clang_library(clangSerialization
   GeneratePCH.cpp
   ASTCommon.cpp
@@ -11,10 +13,6 @@
   ASTWriterStmt.cpp
   )
 
-target_link_libraries(clangSerialization
-  clangFrontend
-  )
-
 add_dependencies(clangSerialization
   ClangAttrClasses
   ClangAttrList
@@ -24,5 +22,4 @@
   ClangDiagnosticLex
   ClangDiagnosticSema
   ClangDeclNodes
-  ClangStmtNodes
-  )
+  ClangStmtNodes)

Modified: cfe/trunk/tools/c-index-test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-index-test/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/tools/c-index-test/CMakeLists.txt (original)
+++ cfe/trunk/tools/c-index-test/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -1,11 +1,15 @@
 set(LLVM_NO_RTTI 1)
 
-add_clang_executable(c-index-test
-  c-index-test.c
+set(LLVM_USED_LIBS libclang)
+
+set( LLVM_LINK_COMPONENTS
+  bitreader
+  mc
+  core
   )
 
-target_link_libraries(c-index-test
-  libclang
+add_clang_executable(c-index-test
+  c-index-test.c
   )
 
 set_target_properties(c-index-test

Modified: cfe/trunk/tools/driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/tools/driver/CMakeLists.txt (original)
+++ cfe/trunk/tools/driver/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -1,20 +1,6 @@
 set(LLVM_NO_RTTI 1)
 
-add_clang_executable(clang
-  driver.cpp
-  cc1_main.cpp
-  cc1as_main.cpp
-  )
-
-add_llvm_link_components(clang all)
-target_link_libraries(clang
-  LLVMAsmParser
-  LLVMBitReader
-  LLVMBitWriter
-  LLVMCodeGen
-  LLVMipo
-  LLVMSelectionDAG
-
+set( LLVM_USED_LIBS
   clangFrontendTool
   clangFrontend
   clangDriver
@@ -31,6 +17,22 @@
   clangBasic
   )
 
+set( LLVM_LINK_COMPONENTS
+  ${LLVM_TARGETS_TO_BUILD}
+  asmparser
+  bitreader
+  bitwriter
+  codegen
+  ipo
+  selectiondag
+  )
+
+add_clang_executable(clang
+  driver.cpp
+  cc1_main.cpp
+  cc1as_main.cpp
+  )
+
 if(UNIX)
   set(CLANGXX_LINK_OR_COPY create_symlink)
   set(CLANGXX_DESTDIR $ENV{DESTDIR}/)

Modified: cfe/trunk/tools/libclang/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CMakeLists.txt?rev=113817&r1=113816&r2=113817&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CMakeLists.txt (original)
+++ cfe/trunk/tools/libclang/CMakeLists.txt Mon Sep 13 18:54:41 2010
@@ -2,6 +2,22 @@
 
 set(LLVM_NO_RTTI 1)
 
+set(LLVM_USED_LIBS
+  clangFrontend
+  clangDriver
+  clangSerialization
+  clangIndex
+  clangSema
+  clangAST
+  clangLex
+  clangBasic)
+
+set( LLVM_LINK_COMPONENTS
+  bitreader
+  mc
+  core
+  )
+
 add_clang_library(libclang
   CIndex.cpp
   CIndexCXX.cpp
@@ -13,34 +29,19 @@
   CXCursor.cpp
   CXType.cpp
   ../../include/clang-c/Index.h
-  )
-
-target_link_libraries(libclang
-  LLVMBitReader
-  LLVMMC
-  LLVMCore
-
-  clangFrontend
-  clangDriver
-  clangSerialization
-  clangIndex
-  clangSema
-  clangAST
-  clangLex
-  clangBasic
-  )
+)
 
 if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
   # dylib versioning information
   # FIXME: Is there a more CMake-ish way to handle this?
-  set(LIBCLANG_VERSION 1
+  set(LIBCLANG_VERSION 1 
       CACHE STRING "Version number of the libclang library")
   set(LIBCLANG_SUBVERSION 0
       CACHE STRING "Minor version number of the libclang library")
-  set(LIBCLANG_LINK_FLAGS
+  set(LIBCLANG_LINK_FLAGS 
       "-Wl,-current_version -Wl,${LIBCLANG_VERSION}.${LIBCLANG_SUBVERSION} -Wl,-compatibility_version -Wl,1")
 
-  set(LIBCLANG_LINK_FLAGS
+  set(LIBCLANG_LINK_FLAGS 
       "${LIBCLANG_LINK_FLAGS} -Wl,-dead_strip -Wl,-seg1addr -Wl,0xE0000000")
 
   set_target_properties(libclang





More information about the cfe-commits mailing list