diff options
author | Oscar Fuentes <ofv@wanadoo.es> | 2010-11-14 21:17:13 +0000 |
---|---|---|
committer | Oscar Fuentes <ofv@wanadoo.es> | 2010-11-14 21:17:13 +0000 |
commit | db2c50907f9423767b423aca313e2182ee7b71c4 (patch) | |
tree | 4905d5ca597132f58d461935aa1aa36e415faca3 | |
parent | 6098168963539062a83b1bd42549b0e03f2864c2 (diff) |
Detect presence of AsmPrinter's. Remove some cruft too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119077 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | CMakeLists.txt | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 688fb38a42..3300fddae7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -328,25 +328,25 @@ foreach(t ${LLVM_TARGETS_TO_BUILD}) message(STATUS "Targeting ${t}") add_subdirectory(lib/Target/${t}) add_subdirectory(lib/Target/${t}/TargetInfo) - file(GLOB ASMPRINTER_FILE ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/*AsmPrinter.cpp ) - if( EXISTS ${ASMPRINTER_FILE} ) + 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 ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/InstPrinter/CMakeLists.txt ) + if( EXISTS ${td}/InstPrinter/CMakeLists.txt ) add_subdirectory(lib/Target/${t}/InstPrinter) - endif( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/InstPrinter/CMakeLists.txt ) - if( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/AsmParser/CMakeLists.txt ) + endif() + if( EXISTS ${td}/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 ) - if( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/Disassembler/CMakeLists.txt ) + endif() + if( EXISTS ${td}/Disassembler/CMakeLists.txt ) add_subdirectory(lib/Target/${t}/Disassembler) set(LLVM_ENUM_DISASSEMBLERS "${LLVM_ENUM_DISASSEMBLERS}LLVM_DISASSEMBLER(${t})\n") - endif( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/Disassembler/CMakeLists.txt ) + endif() set(CURRENT_LLVM_TARGET) endforeach(t) |