second half of commit.
[oota-llvm.git] / CMakeLists.txt
index 77650656e591706efe6858a4f1b3d046451d44d8..90586fbe7b859fc99a1c2c33ee3d0bbc9344356d 100644 (file)
@@ -49,24 +49,21 @@ endif()
 set(LLVM_ALL_TARGETS
   Alpha
   ARM
+  Blackfin
   CBackend
   CellSPU
   CppBackend
-  IA64
   Mips
   MSIL
   MSP430
   PIC16
   PowerPC
   Sparc
+  SystemZ
   X86
   XCore
   )
 
-# List of targets whose asmprinters need to be forced to link
-# into executables on some platforms (i.e. Windows):
-set(LLVM_ASMPRINTERS_FORCE_LINK X86 PowerPC)
-
 if( MSVC )
   set(LLVM_TARGETS_TO_BUILD X86
     CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
@@ -209,6 +206,9 @@ if( MSVC )
   add_llvm_definitions( -wd4146 -wd4503 -wd4996 -wd4800 -wd4244 -wd4624 )
   add_llvm_definitions( -wd4355 -wd4715 -wd4180 -wd4345 -wd4224 )
 
+  # Suppress 'new behavior: elements of array 'array' will be default initialized'
+  add_llvm_definitions( -wd4351 )
+
   if (NOT ${LLVM_USE_CRT} STREQUAL "")
     list(FIND MSVC_CRT ${LLVM_USE_CRT} idx)
     if (idx LESS 0)
@@ -260,7 +260,10 @@ add_subdirectory(lib/Analysis)
 add_subdirectory(lib/Analysis/IPA)
 add_subdirectory(lib/MC)
 
+add_subdirectory(utils/FileCheck)
+
  set(LLVM_ENUM_ASM_PRINTERS "")
+ set(LLVM_ENUM_ASM_PARSERS "")
  foreach(t ${LLVM_TARGETS_TO_BUILD})
   message(STATUS "Targeting ${t}")
   add_subdirectory(lib/Target/${t})
@@ -270,6 +273,11 @@ add_subdirectory(lib/MC)
     set(LLVM_ENUM_ASM_PRINTERS 
         "${LLVM_ENUM_ASM_PRINTERS}LLVM_ASM_PRINTER(${t})\n")
  endif( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/AsmPrinter/CMakeLists.txt )
+  if( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/AsmParser/CMakeLists.txt )
+   add_subdirectory(lib/Target/${t}/AsmParser)
+    set(LLVM_ENUM_ASM_PARSERS 
+        "${LLVM_ENUM_ASM_PARSERS}LLVM_ASM_PARSER(${t})\n")
+ endif( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/AsmParser/CMakeLists.txt )
 endforeach(t)
 
 # Produce llvm/Config/AsmPrinters.def
@@ -278,6 +286,12 @@ configure_file(
   ${LLVM_BINARY_DIR}/include/llvm/Config/AsmPrinters.def
   )
 
+# Produce llvm/Config/AsmParsers.def
+configure_file(
+  ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/AsmParsers.def.in
+  ${LLVM_BINARY_DIR}/include/llvm/Config/AsmParsers.def
+  )
+
 add_subdirectory(lib/ExecutionEngine)
 add_subdirectory(lib/ExecutionEngine/Interpreter)
 add_subdirectory(lib/ExecutionEngine/JIT)