Michael J. Spencer | 92e1deb | 2011-01-20 06:39:06 +0000 | [diff] [blame] | 1 | # NOTE: The tools are organized into groups of four consisting of one large and |
| 2 | # three small executables. This is done to minimize memory load in parallel |
| 3 | # builds. Please retain this ordering. |
Oscar Fuentes | 3d01fc7 | 2008-09-22 01:08:49 +0000 | [diff] [blame] | 4 | |
Tobias Grosser | baaadb2 | 2010-10-30 00:54:26 +0000 | [diff] [blame] | 5 | # If polly exists and is not disabled compile it and add it to the LLVM tools. |
| 6 | option(LLVM_BUILD_POLLY "Compile polly" ON) |
| 7 | if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/polly/CMakeLists.txt ) |
| 8 | if (LLVM_BUILD_POLLY) |
| 9 | add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/polly) |
| 10 | endif (LLVM_BUILD_POLLY) |
| 11 | endif( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/polly/CMakeLists.txt ) |
| 12 | |
Michael J. Spencer | 3a210e2 | 2010-09-13 23:59:48 +0000 | [diff] [blame] | 13 | if( NOT WIN32 OR MSYS OR CYGWIN ) |
| 14 | # It is useful to build llvm-config before the other tools, so we |
| 15 | # have a fresh LibDeps.txt for regenerating the hard-coded library |
| 16 | # dependencies. llvm-config/CMakeLists.txt takes care of this but we |
| 17 | # must keep llvm-config as the first entry on the list of tools to |
| 18 | # be built. |
| 19 | add_subdirectory(llvm-config) |
| 20 | endif() |
| 21 | |
Oscar Fuentes | 3d01fc7 | 2008-09-22 01:08:49 +0000 | [diff] [blame] | 22 | add_subdirectory(opt) |
| 23 | add_subdirectory(llvm-as) |
| 24 | add_subdirectory(llvm-dis) |
Chris Lattner | f9f065e | 2009-06-18 23:04:45 +0000 | [diff] [blame] | 25 | add_subdirectory(llvm-mc) |
Oscar Fuentes | 3d01fc7 | 2008-09-22 01:08:49 +0000 | [diff] [blame] | 26 | |
| 27 | add_subdirectory(llc) |
| 28 | add_subdirectory(llvm-ranlib) |
| 29 | add_subdirectory(llvm-ar) |
| 30 | add_subdirectory(llvm-nm) |
| 31 | |
| 32 | add_subdirectory(llvm-ld) |
| 33 | add_subdirectory(llvm-prof) |
| 34 | add_subdirectory(llvm-link) |
| 35 | add_subdirectory(lli) |
| 36 | |
Oscar Fuentes | 3d01fc7 | 2008-09-22 01:08:49 +0000 | [diff] [blame] | 37 | add_subdirectory(llvm-extract) |
John McCall | b82b433 | 2010-08-24 09:16:51 +0000 | [diff] [blame] | 38 | add_subdirectory(llvm-diff) |
Daniel Dunbar | 75373ac | 2010-11-27 05:58:44 +0000 | [diff] [blame] | 39 | add_subdirectory(macho-dump) |
Michael J. Spencer | 92e1deb | 2011-01-20 06:39:06 +0000 | [diff] [blame] | 40 | add_subdirectory(llvm-objdump) |
Jim Grosbach | 1cb19a4 | 2011-03-18 17:11:39 +0000 | [diff] [blame] | 41 | add_subdirectory(llvm-rtdyld) |
Oscar Fuentes | 3d01fc7 | 2008-09-22 01:08:49 +0000 | [diff] [blame] | 42 | |
| 43 | add_subdirectory(bugpoint) |
Rafael Espindola | 6b01837 | 2010-08-08 00:50:57 +0000 | [diff] [blame] | 44 | add_subdirectory(bugpoint-passes) |
Oscar Fuentes | 3d01fc7 | 2008-09-22 01:08:49 +0000 | [diff] [blame] | 45 | add_subdirectory(llvm-bcanalyzer) |
| 46 | add_subdirectory(llvm-stub) |
Ted Kremenek | 0a6f053 | 2010-04-13 20:52:50 +0000 | [diff] [blame] | 47 | add_subdirectory(edis) |
Oscar Fuentes | 63c956c | 2008-11-25 22:18:49 +0000 | [diff] [blame] | 48 | add_subdirectory(llvmc) |
Oscar Fuentes | 48ed0f5 | 2008-10-26 00:52:09 +0000 | [diff] [blame] | 49 | |
Oscar Fuentes | 98f6ddc | 2011-03-13 03:06:59 +0000 | [diff] [blame] | 50 | if( NOT WIN32 ) |
| 51 | add_subdirectory(lto) |
| 52 | endif() |
| 53 | |
Chandler Carruth | d779749 | 2011-04-28 08:18:22 +0000 | [diff] [blame] | 54 | if( LLVM_ENABLE_PIC ) |
| 55 | # TODO: support other systems: |
| 56 | if( CMAKE_SYSTEM_NAME STREQUAL "Linux" ) |
| 57 | add_subdirectory(gold) |
| 58 | endif() |
| 59 | endif() |
| 60 | |
Oscar Fuentes | 48ed0f5 | 2008-10-26 00:52:09 +0000 | [diff] [blame] | 61 | if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt ) |
Douglas Gregor | e696436 | 2011-07-14 23:49:55 +0000 | [diff] [blame^] | 62 | option(LLVM_BUILD_CLANG "Whether to build Clang as part of LLVM" ON) |
| 63 | if (${LLVM_BUILD_CLANG}) |
| 64 | add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/clang ) |
| 65 | endif() |
Michael J. Spencer | 3a210e2 | 2010-09-13 23:59:48 +0000 | [diff] [blame] | 66 | endif( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt ) |
| 67 | |
| 68 | set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE) |