Hans Wennborg | fe06e81 | 2013-08-23 17:59:13 +0000 | [diff] [blame] | 1 | add_llvm_tool_subdirectory(llvm-config) |
Michael J. Spencer | 93c9b2e | 2010-09-13 23:59:48 +0000 | [diff] [blame] | 2 | |
Sebastian Pop | a59005b | 2014-03-14 04:04:14 +0000 | [diff] [blame] | 3 | # Build polly before the tools: the tools link against polly when |
| 4 | # LINK_POLLY_INTO_TOOLS is set. |
| 5 | if(WITH_POLLY) |
| 6 | add_llvm_external_project(polly) |
| 7 | else(WITH_POLLY) |
| 8 | list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${LLVM_MAIN_SRC_DIR}/tools/polly") |
| 9 | endif(WITH_POLLY) |
| 10 | |
NAKAMURA Takumi | e1e5274 | 2014-11-10 15:03:02 +0000 | [diff] [blame^] | 11 | if( LLVM_BUILD_LLVM_DYLIB ) |
| 12 | add_llvm_tool_subdirectory(llvm-shlib) |
| 13 | else() |
| 14 | ignore_llvm_tool_subdirectory(llvm-shlib) |
| 15 | endif() |
| 16 | |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame] | 17 | add_llvm_tool_subdirectory(opt) |
| 18 | add_llvm_tool_subdirectory(llvm-as) |
| 19 | add_llvm_tool_subdirectory(llvm-dis) |
| 20 | add_llvm_tool_subdirectory(llvm-mc) |
Oscar Fuentes | a229b3c | 2008-09-22 01:08:49 +0000 | [diff] [blame] | 21 | |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame] | 22 | add_llvm_tool_subdirectory(llc) |
| 23 | add_llvm_tool_subdirectory(llvm-ar) |
| 24 | add_llvm_tool_subdirectory(llvm-nm) |
| 25 | add_llvm_tool_subdirectory(llvm-size) |
Oscar Fuentes | a229b3c | 2008-09-22 01:08:49 +0000 | [diff] [blame] | 26 | |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame] | 27 | add_llvm_tool_subdirectory(llvm-cov) |
Duncan P. N. Exon Smith | 846a627 | 2014-02-17 23:22:49 +0000 | [diff] [blame] | 28 | add_llvm_tool_subdirectory(llvm-profdata) |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame] | 29 | add_llvm_tool_subdirectory(llvm-link) |
| 30 | add_llvm_tool_subdirectory(lli) |
Oscar Fuentes | a229b3c | 2008-09-22 01:08:49 +0000 | [diff] [blame] | 31 | |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame] | 32 | add_llvm_tool_subdirectory(llvm-extract) |
| 33 | add_llvm_tool_subdirectory(llvm-diff) |
| 34 | add_llvm_tool_subdirectory(macho-dump) |
| 35 | add_llvm_tool_subdirectory(llvm-objdump) |
| 36 | add_llvm_tool_subdirectory(llvm-readobj) |
| 37 | add_llvm_tool_subdirectory(llvm-rtdyld) |
| 38 | add_llvm_tool_subdirectory(llvm-dwarfdump) |
David Majnemer | 72ab1a5 | 2014-07-24 23:14:40 +0000 | [diff] [blame] | 39 | add_llvm_tool_subdirectory(llvm-vtabledump) |
Andrew Kaylor | 93fe3dc | 2012-11-21 20:38:26 +0000 | [diff] [blame] | 40 | if( LLVM_USE_INTEL_JITEVENTS ) |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame] | 41 | add_llvm_tool_subdirectory(llvm-jitlistener) |
| 42 | else() |
| 43 | ignore_llvm_tool_subdirectory(llvm-jitlistener) |
Andrew Kaylor | 93fe3dc | 2012-11-21 20:38:26 +0000 | [diff] [blame] | 44 | endif( LLVM_USE_INTEL_JITEVENTS ) |
Oscar Fuentes | a229b3c | 2008-09-22 01:08:49 +0000 | [diff] [blame] | 45 | |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame] | 46 | add_llvm_tool_subdirectory(bugpoint) |
| 47 | add_llvm_tool_subdirectory(bugpoint-passes) |
| 48 | add_llvm_tool_subdirectory(llvm-bcanalyzer) |
| 49 | add_llvm_tool_subdirectory(llvm-stress) |
| 50 | add_llvm_tool_subdirectory(llvm-mcmarkup) |
Oscar Fuentes | e638f5d | 2008-10-26 00:52:09 +0000 | [diff] [blame] | 51 | |
Duncan P. N. Exon Smith | a12e023 | 2014-07-30 17:11:27 +0000 | [diff] [blame] | 52 | add_llvm_tool_subdirectory(verify-uselistorder) |
Duncan P. N. Exon Smith | 4b4d8ec | 2014-07-25 17:13:03 +0000 | [diff] [blame] | 53 | |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame] | 54 | add_llvm_tool_subdirectory(llvm-symbolizer) |
Alexander Potapenko | 8c07f55 | 2012-11-12 11:33:29 +0000 | [diff] [blame] | 55 | |
NAKAMURA Takumi | 07a6406 | 2013-10-23 17:56:59 +0000 | [diff] [blame] | 56 | add_llvm_tool_subdirectory(llvm-c-test) |
Anders Waldenborg | b932c66 | 2013-10-23 08:10:20 +0000 | [diff] [blame] | 57 | |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame] | 58 | add_llvm_tool_subdirectory(obj2yaml) |
| 59 | add_llvm_tool_subdirectory(yaml2obj) |
Rafael Espindola | 87a0290 | 2013-04-05 02:57:22 +0000 | [diff] [blame] | 60 | |
Peter Collingbourne | 244ecf5 | 2014-10-23 02:33:23 +0000 | [diff] [blame] | 61 | add_llvm_tool_subdirectory(llvm-go) |
| 62 | |
Rafael Espindola | 3ef98ff | 2014-06-27 02:51:21 +0000 | [diff] [blame] | 63 | if(NOT CYGWIN AND LLVM_ENABLE_PIC) |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame] | 64 | add_llvm_tool_subdirectory(lto) |
Peter Collingbourne | 4e380b0 | 2013-09-19 22:15:52 +0000 | [diff] [blame] | 65 | add_llvm_tool_subdirectory(llvm-lto) |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame] | 66 | else() |
| 67 | ignore_llvm_tool_subdirectory(lto) |
Peter Collingbourne | 4e380b0 | 2013-09-19 22:15:52 +0000 | [diff] [blame] | 68 | ignore_llvm_tool_subdirectory(llvm-lto) |
Oscar Fuentes | ac824ee | 2011-03-13 03:06:59 +0000 | [diff] [blame] | 69 | endif() |
| 70 | |
Chandler Carruth | 3f7b581 | 2011-04-28 08:18:22 +0000 | [diff] [blame] | 71 | if( LLVM_ENABLE_PIC ) |
| 72 | # TODO: support other systems: |
Rafael Espindola | bd5bd89 | 2013-03-17 12:01:05 +0000 | [diff] [blame] | 73 | if( (CMAKE_SYSTEM_NAME STREQUAL "Linux") |
| 74 | OR (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") ) |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame] | 75 | add_llvm_tool_subdirectory(gold) |
| 76 | else() |
| 77 | ignore_llvm_tool_subdirectory(gold) |
Chandler Carruth | 3f7b581 | 2011-04-28 08:18:22 +0000 | [diff] [blame] | 78 | endif() |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame] | 79 | else() |
| 80 | ignore_llvm_tool_subdirectory(gold) |
Chandler Carruth | 3f7b581 | 2011-04-28 08:18:22 +0000 | [diff] [blame] | 81 | endif() |
| 82 | |
Michael J. Spencer | e734f54 | 2012-04-26 19:43:35 +0000 | [diff] [blame] | 83 | add_llvm_external_project(clang) |
Andy Gibbs | 3ef5ed1 | 2013-06-26 08:05:08 +0000 | [diff] [blame] | 84 | |
| 85 | if( NOT LLVM_INCLUDE_TOOLS STREQUAL "bootstrap-only" ) |
Argyrios Kyrtzidis | dba67a2 | 2013-08-27 23:27:56 +0000 | [diff] [blame] | 86 | add_llvm_external_project(lld) |
| 87 | add_llvm_external_project(lldb) |
Sebastian Pop | e3cd142 | 2014-03-10 20:47:39 +0000 | [diff] [blame] | 88 | |
Argyrios Kyrtzidis | 7eec9d0 | 2013-08-21 19:13:44 +0000 | [diff] [blame] | 89 | # Automatically add remaining sub-directories containing a 'CMakeLists.txt' |
| 90 | # file as external projects. |
| 91 | add_llvm_implicit_external_projects() |
Andy Gibbs | 3ef5ed1 | 2013-06-26 08:05:08 +0000 | [diff] [blame] | 92 | endif() |
Michael J. Spencer | 93c9b2e | 2010-09-13 23:59:48 +0000 | [diff] [blame] | 93 | |
| 94 | set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE) |