Use explicit add_subdirectory's for LLVM target sublibraries instead
authorOscar Fuentes <ofv@wanadoo.es>
Sun, 20 Feb 2011 02:55:27 +0000 (02:55 +0000)
committerOscar Fuentes <ofv@wanadoo.es>
Sun, 20 Feb 2011 02:55:27 +0000 (02:55 +0000)
of testing for its presence at cmake time.

This way the build automatically regenerates the makefiles when a svn
update brings in a new sublibrary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126068 91177308-0d34-0410-b5e6-96231b3b80d8

17 files changed:
cmake/modules/AddLLVM.cmake
lib/Target/ARM/CMakeLists.txt
lib/Target/Alpha/CMakeLists.txt
lib/Target/Blackfin/CMakeLists.txt
lib/Target/CBackend/CMakeLists.txt
lib/Target/CMakeLists.txt
lib/Target/CellSPU/CMakeLists.txt
lib/Target/CppBackend/CMakeLists.txt
lib/Target/MBlaze/CMakeLists.txt
lib/Target/MSP430/CMakeLists.txt
lib/Target/Mips/CMakeLists.txt
lib/Target/PTX/CMakeLists.txt
lib/Target/PowerPC/CMakeLists.txt
lib/Target/Sparc/CMakeLists.txt
lib/Target/SystemZ/CMakeLists.txt
lib/Target/X86/CMakeLists.txt
lib/Target/XCore/CMakeLists.txt

index 9d275a00a2447208a1a60367aa61e525eda7cd63..dfe67cded331a87ec3311b6116f29e17de6e5423 100755 (executable)
@@ -121,5 +121,5 @@ macro(add_llvm_target target_name)
   if ( TABLEGEN_OUTPUT )
     add_dependencies(LLVM${target_name} ${target_name}Table_gen)
   endif (TABLEGEN_OUTPUT)
-  set(CURRENT_LLVM_TARGET LLVM${target_name} PARENT_SCOPE)
+  set( CURRENT_LLVM_TARGET LLVM${target_name} )
 endmacro(add_llvm_target)
index 38741eb26f23656044a25d8a3598edd98f7414a2..d3b8b54e76b86d7353bae2c846a7978e5f5b8a88 100644 (file)
@@ -62,3 +62,8 @@ set_property(
   PROPERTY COMPILE_FLAGS "/Od"
   )
 endif()
+
+add_subdirectory(TargetInfo)
+add_subdirectory(AsmParser)
+add_subdirectory(Disassembler)
+add_subdirectory(InstPrinter)
index c8bd86661980ff0eb7aba2df993888874749501c..454262ad631dbf787d4422474790aa1439896be8 100644 (file)
@@ -24,3 +24,5 @@ add_llvm_target(AlphaCodeGen
   AlphaTargetMachine.cpp
   AlphaSelectionDAGInfo.cpp
   )
+
+add_subdirectory(TargetInfo)
index f19b666f49d5636bba6f79f369e1629d2c3a2b5c..a47299ff1611660e241f26c532cd7ee42bdfed4f 100644 (file)
@@ -24,3 +24,5 @@ add_llvm_target(BlackfinCodeGen
   BlackfinTargetMachine.cpp
   BlackfinSelectionDAGInfo.cpp
   )
+
+add_subdirectory(TargetInfo)
index be243366d50ebfd96b01614d2acdfc94150ebdf4..a23ff852970318d45c4f222883021749fbe458ad 100644 (file)
@@ -1,3 +1,5 @@
 add_llvm_target(CBackend
   CBackend.cpp
   )
+
+add_subdirectory(TargetInfo)
index fe9a12649551bf5d022a6f27847147cd0b6ad0a7..09b48ce632f2e0db2eb67f3a942de0f6e03f1b53 100644 (file)
@@ -22,30 +22,20 @@ set(LLVM_ENUM_DISASSEMBLERS "")
 foreach(t ${LLVM_TARGETS_TO_BUILD})
   message(STATUS "Targeting ${t}")
   add_subdirectory(${t})
-  add_subdirectory(${t}/TargetInfo)
   set( td ${LLVM_MAIN_SRC_DIR}/lib/Target/${t} )
   file(GLOB asmp_file "${td}/*AsmPrinter.cpp")
   if( asmp_file )
     set(LLVM_ENUM_ASM_PRINTERS
       "${LLVM_ENUM_ASM_PRINTERS}LLVM_ASM_PRINTER(${t})\n")
   endif()
-  if( EXISTS ${td}/InstPrinter/CMakeLists.txt )
-    add_subdirectory(${t}/InstPrinter)
-  endif()
   if( EXISTS ${td}/AsmParser/CMakeLists.txt )
-    add_subdirectory(${t}/AsmParser)
     set(LLVM_ENUM_ASM_PARSERS
       "${LLVM_ENUM_ASM_PARSERS}LLVM_ASM_PARSER(${t})\n")
   endif()
   if( EXISTS ${td}/Disassembler/CMakeLists.txt )
-    add_subdirectory(${t}/Disassembler)
     set(LLVM_ENUM_DISASSEMBLERS
       "${LLVM_ENUM_DISASSEMBLERS}LLVM_DISASSEMBLER(${t})\n")
   endif()
-  if( EXISTS ${td}/Utils/CMakeLists.txt )
-    add_subdirectory(${td}/Utils)
-  endif()
-  set(CURRENT_LLVM_TARGET)
 endforeach(t)
 
 # Produce llvm/Config/AsmPrinters.def
index 633bdf65fdebccfad6e75123b1165ecbb9d7b13d..a2a2ef1aa9afb0d06f45e73c9d91faa4ca7659f4 100644 (file)
@@ -25,3 +25,5 @@ add_llvm_target(CellSPUCodeGen
   SPUSelectionDAGInfo.cpp
   SPUNopFiller.cpp
   )
+
+add_subdirectory(TargetInfo)
index f8182b80c94c529967eb54d60cd65d65e33acf34..e9375599511cd9c81c7122d9ae3bcce2f38a251c 100644 (file)
@@ -1,3 +1,5 @@
 add_llvm_target(CppBackend
   CPPBackend.cpp
   )
+
+add_subdirectory(TargetInfo)
index e95fb5479e4d3fa2d7e37cf4ee3fd785752f9265..004057ad4ae370a9a51bb29a60a8cfe93cbea7ad 100644 (file)
@@ -33,3 +33,8 @@ add_llvm_target(MBlazeCodeGen
   MBlazeELFWriterInfo.cpp
   MBlazeMCCodeEmitter.cpp
   )
+
+add_subdirectory(AsmParser)
+add_subdirectory(Disassembler)
+add_subdirectory(InstPrinter)
+add_subdirectory(TargetInfo)
index 38886007b5bd098230f81220937ead34746c09ae..2c7cbb64418fa05e5e39be4497938998bc879194 100644 (file)
@@ -24,3 +24,6 @@ add_llvm_target(MSP430CodeGen
   MSP430AsmPrinter.cpp
   MSP430MCInstLower.cpp
   )
+
+add_subdirectory(InstPrinter)
+add_subdirectory(TargetInfo)
index 53a5280a9dd795c0f84468df9279dd08cbf8fe81..26df1a05295e73fd20e7dafacf3d6d91f13a413d 100644 (file)
@@ -24,3 +24,5 @@ add_llvm_target(MipsCodeGen
   MipsTargetObjectFile.cpp
   MipsSelectionDAGInfo.cpp
   )
+
+add_subdirectory(TargetInfo)
index b7d964e9241dceff081200fac4d013e5583cfcfc..331266da30b3495d564e27bdc586e973ffdeb163 100644 (file)
@@ -22,3 +22,5 @@ add_llvm_target(PTXCodeGen
   PTXSubtarget.cpp
   PTXTargetMachine.cpp
   )
+
+add_subdirectory(TargetInfo)
index 104d7692f1b53c3339a547e97c5b76e6dec801c7..f28257999d1b1630eed5f68efb7f66dc9d04efc7 100644 (file)
@@ -32,3 +32,6 @@ add_llvm_target(PowerPCCodeGen
   PPCTargetMachine.cpp
   PPCSelectionDAGInfo.cpp
   )
+
+add_subdirectory(InstPrinter)
+add_subdirectory(TargetInfo)
index 3739298da3853b30478d454c5451968a39c0a24a..6839234a470028f574ff86403663d5d7542f045d 100644 (file)
@@ -24,3 +24,5 @@ add_llvm_target(SparcCodeGen
   SparcTargetMachine.cpp
   SparcSelectionDAGInfo.cpp
   )
+
+add_subdirectory(TargetInfo)
index cf02931cdf8383f7628ff9b311e77aa8b4301671..1f5d3552ae7e716426a8b95a1558468a742adefc 100644 (file)
@@ -22,3 +22,5 @@ add_llvm_target(SystemZCodeGen
   SystemZTargetMachine.cpp
   SystemZSelectionDAGInfo.cpp
   )
+
+add_subdirectory(TargetInfo)
index b7100402955ce92f6aff8f61e2705a06e33d74a4..b5fa94f12bc7e5a29f9be4d9876623bbd5c4f012 100644 (file)
@@ -57,3 +57,8 @@ endif()
 
 add_llvm_target(X86CodeGen ${sources})
 
+add_subdirectory(AsmParser)
+add_subdirectory(Disassembler)
+add_subdirectory(InstPrinter)
+add_subdirectory(TargetInfo)
+add_subdirectory(Utils)
index 50459622889be147c27495ab76f6e520abe883f1..9093de691582deee20c29097ece1817c91c3a0e3 100644 (file)
@@ -23,3 +23,5 @@ add_llvm_target(XCoreCodeGen
   XCoreTargetObjectFile.cpp
   XCoreSelectionDAGInfo.cpp
   )
+
+add_subdirectory(TargetInfo)