[cfe-commits] r58180 - in /cfe/trunk: CMakeLists.txt Driver/CMakeLists.txt lib/AST/CMakeLists.txt lib/Analysis/CMakeLists.txt lib/Basic/CMakeLists.txt lib/CMakeLists.txt lib/CodeGen/CMakeLists.txt lib/Driver/CMakeLists.txt lib/Headers/CMakeLists.txt lib/Lex/CMakeLists.txt lib/Parse/CMakeLists.txt lib/Rewrite/CMakeLists.txt lib/Sema/CMakeLists.txt

Oscar Fuentes ofv at wanadoo.es
Sat Oct 25 17:56:18 PDT 2008


Author: ofv
Date: Sat Oct 25 19:56:18 2008
New Revision: 58180

URL: http://llvm.org/viewvc/llvm-project?rev=58180&view=rev
Log:
CMake: Builds and installs clang binary and libs (no docs yet). It
must be under the `tools' subdirectory of the LLVM *source* tree.

Added:
    cfe/trunk/CMakeLists.txt
    cfe/trunk/Driver/CMakeLists.txt
    cfe/trunk/lib/AST/CMakeLists.txt
    cfe/trunk/lib/Analysis/CMakeLists.txt
    cfe/trunk/lib/Basic/CMakeLists.txt
    cfe/trunk/lib/CMakeLists.txt
    cfe/trunk/lib/CodeGen/CMakeLists.txt
    cfe/trunk/lib/Driver/CMakeLists.txt
    cfe/trunk/lib/Headers/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

Added: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=58180&view=auto

==============================================================================
--- cfe/trunk/CMakeLists.txt (added)
+++ cfe/trunk/CMakeLists.txt Sat Oct 25 19:56:18 2008
@@ -0,0 +1,26 @@
+macro(add_clang_library name)
+  add_library( ${name} ${ARGN} )
+  if( LLVM_COMMON_DEPENDS )
+    add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
+  endif( LLVM_COMMON_DEPENDS )
+  install(TARGETS ${name}
+    LIBRARY DESTINATION lib
+    ARCHIVE DESTINATION lib)
+endmacro(add_clang_library)
+
+macro(add_clang_executable name)
+  add_llvm_executable( ${name} ${ARGN} )
+  install(TARGETS ${name}
+    RUNTIME DESTINATION bin)
+endmacro(add_clang_executable)
+
+include_directories(
+  ${CMAKE_CURRENT_SOURCE_DIR}/include
+  )
+
+add_definitions( -D_GNU_SOURCE )
+
+add_subdirectory(lib)
+add_subdirectory(Driver)
+
+# TODO: docs.

Added: cfe/trunk/Driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/CMakeLists.txt?rev=58180&view=auto

==============================================================================
--- cfe/trunk/Driver/CMakeLists.txt (added)
+++ cfe/trunk/Driver/CMakeLists.txt Sat Oct 25 19:56:18 2008
@@ -0,0 +1,40 @@
+set(LLVM_NO_RTTI 1)
+
+set( LLVM_USED_LIBS
+  clangCodeGen
+  clangAnalysis
+  clangRewrite
+  clangSema
+  clangDriver
+  clangAST
+  clangParse
+  clangLex
+  clangBasic
+  )
+
+set( LLVM_LINK_COMPONENTS
+  ${LLVM_TARGETS_TO_BUILD}
+  bitreader
+  bitwriter
+  codegen
+  ipo
+  selectiondag
+  )
+
+add_clang_executable(clang
+  AnalysisConsumer.cpp
+  ASTConsumers.cpp
+  Backend.cpp
+  CacheTokens.cpp
+  clang.cpp
+  DependencyFile.cpp
+  DiagChecker.cpp
+  HTMLPrint.cpp
+  PrintParserCallbacks.cpp
+  PrintPreprocessedOutput.cpp
+  RewriteBlocks.cpp
+  RewriteMacros.cpp
+  RewriteObjC.cpp
+  RewriteTest.cpp
+  SerializationTest.cpp
+  )

Added: cfe/trunk/lib/AST/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CMakeLists.txt?rev=58180&view=auto

==============================================================================
--- cfe/trunk/lib/AST/CMakeLists.txt (added)
+++ cfe/trunk/lib/AST/CMakeLists.txt Sat Oct 25 19:56:18 2008
@@ -0,0 +1,28 @@
+set(LLVM_NO_RTTI 1)
+
+add_clang_library(clangAST
+  ASTConsumer.cpp
+  ASTContext.cpp
+  Builtins.cpp
+  CFG.cpp
+  DeclBase.cpp
+  Decl.cpp
+  DeclCXX.cpp
+  DeclGroup.cpp
+  DeclObjC.cpp
+  DeclSerialization.cpp
+  ExprConstant.cpp
+  Expr.cpp
+  ExprCXX.cpp
+  InheritViz.cpp
+  ParentMap.cpp
+  Stmt.cpp
+  StmtDumper.cpp
+  StmtIterator.cpp
+  StmtPrinter.cpp
+  StmtSerialization.cpp
+  StmtViz.cpp
+  TranslationUnit.cpp
+  Type.cpp
+  TypeSerialization.cpp
+  )

Added: cfe/trunk/lib/Analysis/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CMakeLists.txt?rev=58180&view=auto

==============================================================================
--- cfe/trunk/lib/Analysis/CMakeLists.txt (added)
+++ cfe/trunk/lib/Analysis/CMakeLists.txt Sat Oct 25 19:56:18 2008
@@ -0,0 +1,31 @@
+set(LLVM_NO_RTTI 1)
+
+add_clang_library(clangAnalysis
+  BasicConstraintManager.cpp
+  BasicObjCFoundationChecks.cpp
+  BasicStore.cpp
+  BasicValueFactory.cpp
+  BugReporter.cpp
+  CFRefCount.cpp
+  CheckDeadStores.cpp
+  CheckNSError.cpp
+  CheckObjCDealloc.cpp
+  CheckObjCInstMethSignature.cpp
+  CheckObjCUnusedIVars.cpp
+  Environment.cpp
+  ExplodedGraph.cpp
+  GRBlockCounter.cpp
+  GRCoreEngine.cpp
+  GRExprEngine.cpp
+  GRExprEngineInternalChecks.cpp
+  GRSimpleVals.cpp
+  GRState.cpp
+  GRTransferFuncs.cpp
+  LiveVariables.cpp
+  MemRegion.cpp
+  PathDiagnostic.cpp
+  RegionStore.cpp
+  SVals.cpp
+  SymbolManager.cpp
+  UninitializedValues.cpp
+  )

Added: cfe/trunk/lib/Basic/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/CMakeLists.txt?rev=58180&view=auto

==============================================================================
--- cfe/trunk/lib/Basic/CMakeLists.txt (added)
+++ cfe/trunk/lib/Basic/CMakeLists.txt Sat Oct 25 19:56:18 2008
@@ -0,0 +1,13 @@
+set(LLVM_NO_RTTI 1)
+
+add_clang_library(clangBasic
+  Diagnostic.cpp
+  FileManager.cpp
+  IdentifierTable.cpp
+  LangOptions.cpp
+  SourceLocation.cpp
+  SourceManager.cpp
+  TargetInfo.cpp
+  Targets.cpp
+  TokenKinds.cpp
+  )

Added: cfe/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CMakeLists.txt?rev=58180&view=auto

==============================================================================
--- cfe/trunk/lib/CMakeLists.txt (added)
+++ cfe/trunk/lib/CMakeLists.txt Sat Oct 25 19:56:18 2008
@@ -0,0 +1,10 @@
+add_subdirectory(Headers)
+add_subdirectory(Basic)
+add_subdirectory(Lex)
+add_subdirectory(Parse)
+add_subdirectory(AST)
+add_subdirectory(Sema)
+add_subdirectory(CodeGen)
+add_subdirectory(Analysis)
+add_subdirectory(Rewrite)
+add_subdirectory(Driver)

Added: cfe/trunk/lib/CodeGen/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CMakeLists.txt?rev=58180&view=auto

==============================================================================
--- cfe/trunk/lib/CodeGen/CMakeLists.txt (added)
+++ cfe/trunk/lib/CodeGen/CMakeLists.txt Sat Oct 25 19:56:18 2008
@@ -0,0 +1,22 @@
+set(LLVM_NO_RTTI 1)
+
+add_clang_library(clangCodeGen
+  CGBuiltin.cpp
+  CGCall.cpp
+  CGCXX.cpp
+  CGDebugInfo.cpp
+  CGDecl.cpp
+  CGExprAgg.cpp
+  CGExprComplex.cpp
+  CGExprConstant.cpp
+  CGExpr.cpp
+  CGExprScalar.cpp
+  CGObjC.cpp
+  CGObjCGNU.cpp
+  CGObjCMac.cpp
+  CGStmt.cpp
+  CodeGenFunction.cpp
+  CodeGenModule.cpp
+  CodeGenTypes.cpp
+  ModuleBuilder.cpp
+  )

Added: cfe/trunk/lib/Driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/CMakeLists.txt?rev=58180&view=auto

==============================================================================
--- cfe/trunk/lib/Driver/CMakeLists.txt (added)
+++ cfe/trunk/lib/Driver/CMakeLists.txt Sat Oct 25 19:56:18 2008
@@ -0,0 +1,8 @@
+set(LLVM_NO_RTTI 1)
+
+add_clang_library(clangDriver
+  HTMLDiagnostics.cpp
+  InitHeaderSearch.cpp
+  TextDiagnosticBuffer.cpp
+  TextDiagnosticPrinter.cpp
+  )

Added: cfe/trunk/lib/Headers/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/CMakeLists.txt?rev=58180&view=auto

==============================================================================
--- cfe/trunk/lib/Headers/CMakeLists.txt (added)
+++ cfe/trunk/lib/Headers/CMakeLists.txt Sat Oct 25 19:56:18 2008
@@ -0,0 +1,25 @@
+set(files
+  iso646.h
+  mmintrin.h
+  stdarg.h
+  stdbool.h
+  stddef.h
+  )
+
+set(output_dir ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/../Headers)
+
+foreach( f ${files} )
+  set( src ${CMAKE_CURRENT_SOURCE_DIR}/${f} )
+  set( dst ${output_dir}/${f} )
+  add_custom_command(OUTPUT ${dst}
+    DEPENDS ${src}
+    COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
+    COMMENT "Copying clang's ${f}...")
+endforeach( f )
+
+add_custom_target(clang_headers ALL
+  DEPENDS ${files})
+
+install(FILES ${files}
+  PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+  DESTINATION Headers)

Added: cfe/trunk/lib/Lex/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/CMakeLists.txt?rev=58180&view=auto

==============================================================================
--- cfe/trunk/lib/Lex/CMakeLists.txt (added)
+++ cfe/trunk/lib/Lex/CMakeLists.txt Sat Oct 25 19:56:18 2008
@@ -0,0 +1,21 @@
+set(LLVM_NO_RTTI 1)
+
+# TODO: Add -maltivec when ARCH is PowerPC.
+
+add_clang_library(clangLex
+  HeaderMap.cpp
+  HeaderSearch.cpp
+  Lexer.cpp
+  LiteralSupport.cpp
+  MacroArgs.cpp
+  MacroInfo.cpp
+  PPCaching.cpp
+  PPDirectives.cpp
+  PPExpressions.cpp
+  PPLexerChange.cpp
+  PPMacroExpansion.cpp
+  Pragma.cpp
+  Preprocessor.cpp
+  ScratchBuffer.cpp
+  TokenLexer.cpp
+  )

Added: cfe/trunk/lib/Parse/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/CMakeLists.txt?rev=58180&view=auto

==============================================================================
--- cfe/trunk/lib/Parse/CMakeLists.txt (added)
+++ cfe/trunk/lib/Parse/CMakeLists.txt Sat Oct 25 19:56:18 2008
@@ -0,0 +1,18 @@
+set(LLVM_NO_RTTI 1)
+
+add_clang_library(clangParse
+  AttributeList.cpp
+  DeclSpec.cpp
+  MinimalAction.cpp
+  ParseCXXInlineMethods.cpp
+  ParseDecl.cpp
+  ParseDeclCXX.cpp
+  ParseExpr.cpp
+  ParseExprCXX.cpp
+  ParseInit.cpp
+  ParseObjc.cpp
+  ParsePragma.cpp
+  Parser.cpp
+  ParseStmt.cpp
+  ParseTentative.cpp
+  )

Added: cfe/trunk/lib/Rewrite/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/CMakeLists.txt?rev=58180&view=auto

==============================================================================
--- cfe/trunk/lib/Rewrite/CMakeLists.txt (added)
+++ cfe/trunk/lib/Rewrite/CMakeLists.txt Sat Oct 25 19:56:18 2008
@@ -0,0 +1,9 @@
+set(LLVM_NO_RTTI 1)
+
+add_clang_library(clangRewrite
+  DeltaTree.cpp
+  HTMLRewrite.cpp
+  Rewriter.cpp
+  RewriteRope.cpp
+  TokenRewriter.cpp
+  )

Added: cfe/trunk/lib/Sema/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/CMakeLists.txt?rev=58180&view=auto

==============================================================================
--- cfe/trunk/lib/Sema/CMakeLists.txt (added)
+++ cfe/trunk/lib/Sema/CMakeLists.txt Sat Oct 25 19:56:18 2008
@@ -0,0 +1,20 @@
+set(LLVM_NO_RTTI 1)
+
+add_clang_library(clangSema
+  IdentifierResolver.cpp
+  ParseAST.cpp
+  SemaChecking.cpp
+  Sema.cpp
+  SemaDeclAttr.cpp
+  SemaDecl.cpp
+  SemaDeclCXX.cpp
+  SemaDeclObjC.cpp
+  SemaExpr.cpp
+  SemaExprCXX.cpp
+  SemaExprObjC.cpp
+  SemaInherit.cpp
+  SemaInit.cpp
+  SemaOverload.cpp
+  SemaStmt.cpp
+  SemaType.cpp
+  )





More information about the cfe-commits mailing list