Michael J. Spencer | 2670c25 | 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 | a229b3c | 2008-09-22 01:08:49 +0000 | [diff] [blame] | 4 | |
Michael J. Spencer | 93c9b2e | 2010-09-13 23:59:48 +0000 | [diff] [blame] | 5 | if( NOT WIN32 OR MSYS OR CYGWIN ) |
Daniel Dunbar | ab0ad4e | 2011-12-01 20:18:09 +0000 | [diff] [blame] | 6 | # We currently require 'sed' to build llvm-config, so don't try to build it |
Duncan Sands | b8e6cee | 2011-12-01 10:50:19 +0000 | [diff] [blame] | 7 | # on pure Win32. |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame^] | 8 | add_llvm_tool_subdirectory(llvm-config) |
| 9 | else() |
| 10 | ignore_llvm_tool_subdirectory(llvm-config) |
Michael J. Spencer | 93c9b2e | 2010-09-13 23:59:48 +0000 | [diff] [blame] | 11 | endif() |
| 12 | |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame^] | 13 | add_llvm_tool_subdirectory(opt) |
| 14 | add_llvm_tool_subdirectory(llvm-as) |
| 15 | add_llvm_tool_subdirectory(llvm-dis) |
| 16 | add_llvm_tool_subdirectory(llvm-mc) |
Oscar Fuentes | a229b3c | 2008-09-22 01:08:49 +0000 | [diff] [blame] | 17 | |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame^] | 18 | add_llvm_tool_subdirectory(llc) |
| 19 | add_llvm_tool_subdirectory(llvm-ar) |
| 20 | add_llvm_tool_subdirectory(llvm-nm) |
| 21 | add_llvm_tool_subdirectory(llvm-size) |
Oscar Fuentes | a229b3c | 2008-09-22 01:08:49 +0000 | [diff] [blame] | 22 | |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame^] | 23 | add_llvm_tool_subdirectory(llvm-cov) |
| 24 | add_llvm_tool_subdirectory(llvm-prof) |
| 25 | add_llvm_tool_subdirectory(llvm-link) |
| 26 | add_llvm_tool_subdirectory(lli) |
Oscar Fuentes | a229b3c | 2008-09-22 01:08:49 +0000 | [diff] [blame] | 27 | |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame^] | 28 | add_llvm_tool_subdirectory(llvm-extract) |
| 29 | add_llvm_tool_subdirectory(llvm-diff) |
| 30 | add_llvm_tool_subdirectory(macho-dump) |
| 31 | add_llvm_tool_subdirectory(llvm-objdump) |
| 32 | add_llvm_tool_subdirectory(llvm-readobj) |
| 33 | add_llvm_tool_subdirectory(llvm-rtdyld) |
| 34 | add_llvm_tool_subdirectory(llvm-dwarfdump) |
Andrew Kaylor | 93fe3dc | 2012-11-21 20:38:26 +0000 | [diff] [blame] | 35 | if( LLVM_USE_INTEL_JITEVENTS ) |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame^] | 36 | add_llvm_tool_subdirectory(llvm-jitlistener) |
| 37 | else() |
| 38 | ignore_llvm_tool_subdirectory(llvm-jitlistener) |
Andrew Kaylor | 93fe3dc | 2012-11-21 20:38:26 +0000 | [diff] [blame] | 39 | endif( LLVM_USE_INTEL_JITEVENTS ) |
Oscar Fuentes | a229b3c | 2008-09-22 01:08:49 +0000 | [diff] [blame] | 40 | |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame^] | 41 | add_llvm_tool_subdirectory(bugpoint) |
| 42 | add_llvm_tool_subdirectory(bugpoint-passes) |
| 43 | add_llvm_tool_subdirectory(llvm-bcanalyzer) |
| 44 | add_llvm_tool_subdirectory(llvm-stress) |
| 45 | add_llvm_tool_subdirectory(llvm-mcmarkup) |
Oscar Fuentes | e638f5d | 2008-10-26 00:52:09 +0000 | [diff] [blame] | 46 | |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame^] | 47 | add_llvm_tool_subdirectory(llvm-symbolizer) |
Alexander Potapenko | 8c07f55 | 2012-11-12 11:33:29 +0000 | [diff] [blame] | 48 | |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame^] | 49 | add_llvm_tool_subdirectory(obj2yaml) |
| 50 | add_llvm_tool_subdirectory(yaml2obj) |
Rafael Espindola | 87a0290 | 2013-04-05 02:57:22 +0000 | [diff] [blame] | 51 | |
Oscar Fuentes | ac824ee | 2011-03-13 03:06:59 +0000 | [diff] [blame] | 52 | if( NOT WIN32 ) |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame^] | 53 | add_llvm_tool_subdirectory(lto) |
| 54 | else() |
| 55 | ignore_llvm_tool_subdirectory(lto) |
Oscar Fuentes | ac824ee | 2011-03-13 03:06:59 +0000 | [diff] [blame] | 56 | endif() |
| 57 | |
Chandler Carruth | 3f7b581 | 2011-04-28 08:18:22 +0000 | [diff] [blame] | 58 | if( LLVM_ENABLE_PIC ) |
| 59 | # TODO: support other systems: |
Rafael Espindola | bd5bd89 | 2013-03-17 12:01:05 +0000 | [diff] [blame] | 60 | if( (CMAKE_SYSTEM_NAME STREQUAL "Linux") |
| 61 | OR (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") ) |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame^] | 62 | add_llvm_tool_subdirectory(gold) |
| 63 | else() |
| 64 | ignore_llvm_tool_subdirectory(gold) |
Chandler Carruth | 3f7b581 | 2011-04-28 08:18:22 +0000 | [diff] [blame] | 65 | endif() |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame^] | 66 | else() |
| 67 | ignore_llvm_tool_subdirectory(gold) |
Chandler Carruth | 3f7b581 | 2011-04-28 08:18:22 +0000 | [diff] [blame] | 68 | endif() |
| 69 | |
Michael J. Spencer | e734f54 | 2012-04-26 19:43:35 +0000 | [diff] [blame] | 70 | add_llvm_external_project(clang) |
Andy Gibbs | 3ef5ed1 | 2013-06-26 08:05:08 +0000 | [diff] [blame] | 71 | |
| 72 | if( NOT LLVM_INCLUDE_TOOLS STREQUAL "bootstrap-only" ) |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame^] | 73 | # Automatically add remaining sub-directories containing a 'CMakeLists.txt' |
| 74 | # file as external projects. |
| 75 | add_llvm_implicit_external_projects() |
Andy Gibbs | 3ef5ed1 | 2013-06-26 08:05:08 +0000 | [diff] [blame] | 76 | endif() |
Michael J. Spencer | 93c9b2e | 2010-09-13 23:59:48 +0000 | [diff] [blame] | 77 | |
| 78 | set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE) |