aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2011-02-20 02:55:27 +0000
committerOscar Fuentes <ofv@wanadoo.es>2011-02-20 02:55:27 +0000
commit00d78f1348a5980a276bed8f9be09ce2412a6a12 (patch)
tree81597ac6d857f5ef9bb97a2341b7cfcb0dc68318
parent7ac0199287f7ebfdb4c609b0d3fd5d7fb41d1ce8 (diff)
downloadexternal_llvm-00d78f1348a5980a276bed8f9be09ce2412a6a12.zip
external_llvm-00d78f1348a5980a276bed8f9be09ce2412a6a12.tar.gz
external_llvm-00d78f1348a5980a276bed8f9be09ce2412a6a12.tar.bz2
Use explicit add_subdirectory's for LLVM target sublibraries instead
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
-rwxr-xr-xcmake/modules/AddLLVM.cmake2
-rw-r--r--lib/Target/ARM/CMakeLists.txt5
-rw-r--r--lib/Target/Alpha/CMakeLists.txt2
-rw-r--r--lib/Target/Blackfin/CMakeLists.txt2
-rw-r--r--lib/Target/CBackend/CMakeLists.txt2
-rw-r--r--lib/Target/CMakeLists.txt10
-rw-r--r--lib/Target/CellSPU/CMakeLists.txt2
-rw-r--r--lib/Target/CppBackend/CMakeLists.txt2
-rw-r--r--lib/Target/MBlaze/CMakeLists.txt5
-rw-r--r--lib/Target/MSP430/CMakeLists.txt3
-rw-r--r--lib/Target/Mips/CMakeLists.txt2
-rw-r--r--lib/Target/PTX/CMakeLists.txt2
-rw-r--r--lib/Target/PowerPC/CMakeLists.txt3
-rw-r--r--lib/Target/Sparc/CMakeLists.txt2
-rw-r--r--lib/Target/SystemZ/CMakeLists.txt2
-rw-r--r--lib/Target/X86/CMakeLists.txt5
-rw-r--r--lib/Target/XCore/CMakeLists.txt2
17 files changed, 42 insertions, 11 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index 9d275a0..dfe67cd 100755
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -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)
diff --git a/lib/Target/ARM/CMakeLists.txt b/lib/Target/ARM/CMakeLists.txt
index 38741eb..d3b8b54 100644
--- a/lib/Target/ARM/CMakeLists.txt
+++ b/lib/Target/ARM/CMakeLists.txt
@@ -62,3 +62,8 @@ set_property(
PROPERTY COMPILE_FLAGS "/Od"
)
endif()
+
+add_subdirectory(TargetInfo)
+add_subdirectory(AsmParser)
+add_subdirectory(Disassembler)
+add_subdirectory(InstPrinter)
diff --git a/lib/Target/Alpha/CMakeLists.txt b/lib/Target/Alpha/CMakeLists.txt
index c8bd866..454262a 100644
--- a/lib/Target/Alpha/CMakeLists.txt
+++ b/lib/Target/Alpha/CMakeLists.txt
@@ -24,3 +24,5 @@ add_llvm_target(AlphaCodeGen
AlphaTargetMachine.cpp
AlphaSelectionDAGInfo.cpp
)
+
+add_subdirectory(TargetInfo)
diff --git a/lib/Target/Blackfin/CMakeLists.txt b/lib/Target/Blackfin/CMakeLists.txt
index f19b666..a47299f 100644
--- a/lib/Target/Blackfin/CMakeLists.txt
+++ b/lib/Target/Blackfin/CMakeLists.txt
@@ -24,3 +24,5 @@ add_llvm_target(BlackfinCodeGen
BlackfinTargetMachine.cpp
BlackfinSelectionDAGInfo.cpp
)
+
+add_subdirectory(TargetInfo)
diff --git a/lib/Target/CBackend/CMakeLists.txt b/lib/Target/CBackend/CMakeLists.txt
index be24336..a23ff85 100644
--- a/lib/Target/CBackend/CMakeLists.txt
+++ b/lib/Target/CBackend/CMakeLists.txt
@@ -1,3 +1,5 @@
add_llvm_target(CBackend
CBackend.cpp
)
+
+add_subdirectory(TargetInfo)
diff --git a/lib/Target/CMakeLists.txt b/lib/Target/CMakeLists.txt
index fe9a126..09b48ce 100644
--- a/lib/Target/CMakeLists.txt
+++ b/lib/Target/CMakeLists.txt
@@ -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
diff --git a/lib/Target/CellSPU/CMakeLists.txt b/lib/Target/CellSPU/CMakeLists.txt
index 633bdf6..a2a2ef1 100644
--- a/lib/Target/CellSPU/CMakeLists.txt
+++ b/lib/Target/CellSPU/CMakeLists.txt
@@ -25,3 +25,5 @@ add_llvm_target(CellSPUCodeGen
SPUSelectionDAGInfo.cpp
SPUNopFiller.cpp
)
+
+add_subdirectory(TargetInfo)
diff --git a/lib/Target/CppBackend/CMakeLists.txt b/lib/Target/CppBackend/CMakeLists.txt
index f8182b8..e937559 100644
--- a/lib/Target/CppBackend/CMakeLists.txt
+++ b/lib/Target/CppBackend/CMakeLists.txt
@@ -1,3 +1,5 @@
add_llvm_target(CppBackend
CPPBackend.cpp
)
+
+add_subdirectory(TargetInfo)
diff --git a/lib/Target/MBlaze/CMakeLists.txt b/lib/Target/MBlaze/CMakeLists.txt
index e95fb54..004057a 100644
--- a/lib/Target/MBlaze/CMakeLists.txt
+++ b/lib/Target/MBlaze/CMakeLists.txt
@@ -33,3 +33,8 @@ add_llvm_target(MBlazeCodeGen
MBlazeELFWriterInfo.cpp
MBlazeMCCodeEmitter.cpp
)
+
+add_subdirectory(AsmParser)
+add_subdirectory(Disassembler)
+add_subdirectory(InstPrinter)
+add_subdirectory(TargetInfo)
diff --git a/lib/Target/MSP430/CMakeLists.txt b/lib/Target/MSP430/CMakeLists.txt
index 3888600..2c7cbb6 100644
--- a/lib/Target/MSP430/CMakeLists.txt
+++ b/lib/Target/MSP430/CMakeLists.txt
@@ -24,3 +24,6 @@ add_llvm_target(MSP430CodeGen
MSP430AsmPrinter.cpp
MSP430MCInstLower.cpp
)
+
+add_subdirectory(InstPrinter)
+add_subdirectory(TargetInfo)
diff --git a/lib/Target/Mips/CMakeLists.txt b/lib/Target/Mips/CMakeLists.txt
index 53a5280..26df1a0 100644
--- a/lib/Target/Mips/CMakeLists.txt
+++ b/lib/Target/Mips/CMakeLists.txt
@@ -24,3 +24,5 @@ add_llvm_target(MipsCodeGen
MipsTargetObjectFile.cpp
MipsSelectionDAGInfo.cpp
)
+
+add_subdirectory(TargetInfo)
diff --git a/lib/Target/PTX/CMakeLists.txt b/lib/Target/PTX/CMakeLists.txt
index b7d964e..331266d 100644
--- a/lib/Target/PTX/CMakeLists.txt
+++ b/lib/Target/PTX/CMakeLists.txt
@@ -22,3 +22,5 @@ add_llvm_target(PTXCodeGen
PTXSubtarget.cpp
PTXTargetMachine.cpp
)
+
+add_subdirectory(TargetInfo)
diff --git a/lib/Target/PowerPC/CMakeLists.txt b/lib/Target/PowerPC/CMakeLists.txt
index 104d769..f282579 100644
--- a/lib/Target/PowerPC/CMakeLists.txt
+++ b/lib/Target/PowerPC/CMakeLists.txt
@@ -32,3 +32,6 @@ add_llvm_target(PowerPCCodeGen
PPCTargetMachine.cpp
PPCSelectionDAGInfo.cpp
)
+
+add_subdirectory(InstPrinter)
+add_subdirectory(TargetInfo)
diff --git a/lib/Target/Sparc/CMakeLists.txt b/lib/Target/Sparc/CMakeLists.txt
index 3739298..6839234 100644
--- a/lib/Target/Sparc/CMakeLists.txt
+++ b/lib/Target/Sparc/CMakeLists.txt
@@ -24,3 +24,5 @@ add_llvm_target(SparcCodeGen
SparcTargetMachine.cpp
SparcSelectionDAGInfo.cpp
)
+
+add_subdirectory(TargetInfo)
diff --git a/lib/Target/SystemZ/CMakeLists.txt b/lib/Target/SystemZ/CMakeLists.txt
index cf02931..1f5d355 100644
--- a/lib/Target/SystemZ/CMakeLists.txt
+++ b/lib/Target/SystemZ/CMakeLists.txt
@@ -22,3 +22,5 @@ add_llvm_target(SystemZCodeGen
SystemZTargetMachine.cpp
SystemZSelectionDAGInfo.cpp
)
+
+add_subdirectory(TargetInfo)
diff --git a/lib/Target/X86/CMakeLists.txt b/lib/Target/X86/CMakeLists.txt
index b710040..b5fa94f 100644
--- a/lib/Target/X86/CMakeLists.txt
+++ b/lib/Target/X86/CMakeLists.txt
@@ -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)
diff --git a/lib/Target/XCore/CMakeLists.txt b/lib/Target/XCore/CMakeLists.txt
index 5045962..9093de6 100644
--- a/lib/Target/XCore/CMakeLists.txt
+++ b/lib/Target/XCore/CMakeLists.txt
@@ -23,3 +23,5 @@ add_llvm_target(XCoreCodeGen
XCoreTargetObjectFile.cpp
XCoreSelectionDAGInfo.cpp
)
+
+add_subdirectory(TargetInfo)