blob: c3ebe18b8a507d37b75d700084c3485c64aaf915 [file] [log] [blame]
Hans Wennborgfe06e812013-08-23 17:59:13 +00001add_llvm_tool_subdirectory(llvm-config)
Michael J. Spencer93c9b2e2010-09-13 23:59:48 +00002
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +00003add_llvm_tool_subdirectory(opt)
4add_llvm_tool_subdirectory(llvm-as)
5add_llvm_tool_subdirectory(llvm-dis)
6add_llvm_tool_subdirectory(llvm-mc)
Oscar Fuentesa229b3c2008-09-22 01:08:49 +00007
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +00008add_llvm_tool_subdirectory(llc)
9add_llvm_tool_subdirectory(llvm-ar)
10add_llvm_tool_subdirectory(llvm-nm)
11add_llvm_tool_subdirectory(llvm-size)
Oscar Fuentesa229b3c2008-09-22 01:08:49 +000012
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000013add_llvm_tool_subdirectory(llvm-cov)
Duncan P. N. Exon Smith846a6272014-02-17 23:22:49 +000014add_llvm_tool_subdirectory(llvm-profdata)
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000015add_llvm_tool_subdirectory(llvm-link)
16add_llvm_tool_subdirectory(lli)
Oscar Fuentesa229b3c2008-09-22 01:08:49 +000017
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000018add_llvm_tool_subdirectory(llvm-extract)
19add_llvm_tool_subdirectory(llvm-diff)
20add_llvm_tool_subdirectory(macho-dump)
21add_llvm_tool_subdirectory(llvm-objdump)
22add_llvm_tool_subdirectory(llvm-readobj)
23add_llvm_tool_subdirectory(llvm-rtdyld)
24add_llvm_tool_subdirectory(llvm-dwarfdump)
Andrew Kaylor93fe3dc2012-11-21 20:38:26 +000025if( LLVM_USE_INTEL_JITEVENTS )
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000026 add_llvm_tool_subdirectory(llvm-jitlistener)
27else()
28 ignore_llvm_tool_subdirectory(llvm-jitlistener)
Andrew Kaylor93fe3dc2012-11-21 20:38:26 +000029endif( LLVM_USE_INTEL_JITEVENTS )
Oscar Fuentesa229b3c2008-09-22 01:08:49 +000030
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000031add_llvm_tool_subdirectory(bugpoint)
32add_llvm_tool_subdirectory(bugpoint-passes)
33add_llvm_tool_subdirectory(llvm-bcanalyzer)
34add_llvm_tool_subdirectory(llvm-stress)
35add_llvm_tool_subdirectory(llvm-mcmarkup)
Oscar Fuentese638f5d2008-10-26 00:52:09 +000036
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000037add_llvm_tool_subdirectory(llvm-symbolizer)
Alexander Potapenko8c07f552012-11-12 11:33:29 +000038
NAKAMURA Takumi07a64062013-10-23 17:56:59 +000039add_llvm_tool_subdirectory(llvm-c-test)
Anders Waldenborgb932c662013-10-23 08:10:20 +000040
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000041add_llvm_tool_subdirectory(obj2yaml)
42add_llvm_tool_subdirectory(yaml2obj)
Rafael Espindola87a02902013-04-05 02:57:22 +000043
Rafael Espindolad38f9af2013-10-02 14:04:38 +000044if( NOT CYGWIN )
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000045 add_llvm_tool_subdirectory(lto)
Peter Collingbourne4e380b02013-09-19 22:15:52 +000046 add_llvm_tool_subdirectory(llvm-lto)
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000047else()
48 ignore_llvm_tool_subdirectory(lto)
Peter Collingbourne4e380b02013-09-19 22:15:52 +000049 ignore_llvm_tool_subdirectory(llvm-lto)
Oscar Fuentesac824ee2011-03-13 03:06:59 +000050endif()
51
Chandler Carruth3f7b5812011-04-28 08:18:22 +000052if( LLVM_ENABLE_PIC )
53 # TODO: support other systems:
Rafael Espindolabd5bd892013-03-17 12:01:05 +000054 if( (CMAKE_SYSTEM_NAME STREQUAL "Linux")
55 OR (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") )
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000056 add_llvm_tool_subdirectory(gold)
57 else()
58 ignore_llvm_tool_subdirectory(gold)
Chandler Carruth3f7b5812011-04-28 08:18:22 +000059 endif()
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000060else()
61 ignore_llvm_tool_subdirectory(gold)
Chandler Carruth3f7b5812011-04-28 08:18:22 +000062endif()
63
Michael J. Spencere734f542012-04-26 19:43:35 +000064add_llvm_external_project(clang)
Andy Gibbs3ef5ed12013-06-26 08:05:08 +000065
66if( NOT LLVM_INCLUDE_TOOLS STREQUAL "bootstrap-only" )
Argyrios Kyrtzidisdba67a22013-08-27 23:27:56 +000067 add_llvm_external_project(lld)
68 add_llvm_external_project(lldb)
Sebastian Pope3cd1422014-03-10 20:47:39 +000069
70 if(WITH_POLLY)
71 add_llvm_external_project(polly)
72 else(WITH_POLLY)
Sebastian Pop02a0dd82014-03-10 21:27:04 +000073 list(APPEND LLVM_IMPLICIT_PROJECT_IGNORE "${LLVM_MAIN_SRC_DIR}/tools/polly")
Sebastian Pope3cd1422014-03-10 20:47:39 +000074 endif(WITH_POLLY)
Argyrios Kyrtzidisdba67a22013-08-27 23:27:56 +000075
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000076 # Automatically add remaining sub-directories containing a 'CMakeLists.txt'
77 # file as external projects.
78 add_llvm_implicit_external_projects()
Andy Gibbs3ef5ed12013-06-26 08:05:08 +000079endif()
Michael J. Spencer93c9b2e2010-09-13 23:59:48 +000080
81set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)