blob: 468d396b59af836dc87d8bd8602172be5478d03f [file] [log] [blame]
Michael J. Spencer2670c252011-01-20 06:39:06 +00001# 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 Fuentesa229b3c2008-09-22 01:08:49 +00004
Hans Wennborgfe06e812013-08-23 17:59:13 +00005add_llvm_tool_subdirectory(llvm-config)
Michael J. Spencer93c9b2e2010-09-13 23:59:48 +00006
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +00007add_llvm_tool_subdirectory(opt)
8add_llvm_tool_subdirectory(llvm-as)
9add_llvm_tool_subdirectory(llvm-dis)
10add_llvm_tool_subdirectory(llvm-mc)
Oscar Fuentesa229b3c2008-09-22 01:08:49 +000011
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000012add_llvm_tool_subdirectory(llc)
13add_llvm_tool_subdirectory(llvm-ar)
14add_llvm_tool_subdirectory(llvm-nm)
15add_llvm_tool_subdirectory(llvm-size)
Oscar Fuentesa229b3c2008-09-22 01:08:49 +000016
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000017add_llvm_tool_subdirectory(llvm-cov)
18add_llvm_tool_subdirectory(llvm-prof)
19add_llvm_tool_subdirectory(llvm-link)
20add_llvm_tool_subdirectory(lli)
Oscar Fuentesa229b3c2008-09-22 01:08:49 +000021
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000022add_llvm_tool_subdirectory(llvm-extract)
23add_llvm_tool_subdirectory(llvm-diff)
24add_llvm_tool_subdirectory(macho-dump)
25add_llvm_tool_subdirectory(llvm-objdump)
26add_llvm_tool_subdirectory(llvm-readobj)
27add_llvm_tool_subdirectory(llvm-rtdyld)
28add_llvm_tool_subdirectory(llvm-dwarfdump)
Andrew Kaylor93fe3dc2012-11-21 20:38:26 +000029if( LLVM_USE_INTEL_JITEVENTS )
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000030 add_llvm_tool_subdirectory(llvm-jitlistener)
31else()
32 ignore_llvm_tool_subdirectory(llvm-jitlistener)
Andrew Kaylor93fe3dc2012-11-21 20:38:26 +000033endif( LLVM_USE_INTEL_JITEVENTS )
Oscar Fuentesa229b3c2008-09-22 01:08:49 +000034
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000035add_llvm_tool_subdirectory(bugpoint)
36add_llvm_tool_subdirectory(bugpoint-passes)
37add_llvm_tool_subdirectory(llvm-bcanalyzer)
38add_llvm_tool_subdirectory(llvm-stress)
39add_llvm_tool_subdirectory(llvm-mcmarkup)
Oscar Fuentese638f5d2008-10-26 00:52:09 +000040
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000041add_llvm_tool_subdirectory(llvm-symbolizer)
Alexander Potapenko8c07f552012-11-12 11:33:29 +000042
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000043add_llvm_tool_subdirectory(obj2yaml)
44add_llvm_tool_subdirectory(yaml2obj)
Rafael Espindola87a02902013-04-05 02:57:22 +000045
Oscar Fuentesac824ee2011-03-13 03:06:59 +000046if( NOT WIN32 )
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000047 add_llvm_tool_subdirectory(lto)
Peter Collingbourne4e380b02013-09-19 22:15:52 +000048 add_llvm_tool_subdirectory(llvm-lto)
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000049else()
50 ignore_llvm_tool_subdirectory(lto)
Peter Collingbourne4e380b02013-09-19 22:15:52 +000051 ignore_llvm_tool_subdirectory(llvm-lto)
Oscar Fuentesac824ee2011-03-13 03:06:59 +000052endif()
53
Chandler Carruth3f7b5812011-04-28 08:18:22 +000054if( LLVM_ENABLE_PIC )
55 # TODO: support other systems:
Rafael Espindolabd5bd892013-03-17 12:01:05 +000056 if( (CMAKE_SYSTEM_NAME STREQUAL "Linux")
57 OR (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") )
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000058 add_llvm_tool_subdirectory(gold)
59 else()
60 ignore_llvm_tool_subdirectory(gold)
Chandler Carruth3f7b5812011-04-28 08:18:22 +000061 endif()
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000062else()
63 ignore_llvm_tool_subdirectory(gold)
Chandler Carruth3f7b5812011-04-28 08:18:22 +000064endif()
65
Michael J. Spencere734f542012-04-26 19:43:35 +000066add_llvm_external_project(clang)
Andy Gibbs3ef5ed12013-06-26 08:05:08 +000067
68if( NOT LLVM_INCLUDE_TOOLS STREQUAL "bootstrap-only" )
Argyrios Kyrtzidisdba67a22013-08-27 23:27:56 +000069 add_llvm_external_project(lld)
70 add_llvm_external_project(lldb)
71 add_llvm_external_project(polly)
72
Argyrios Kyrtzidis7eec9d02013-08-21 19:13:44 +000073 # Automatically add remaining sub-directories containing a 'CMakeLists.txt'
74 # file as external projects.
75 add_llvm_implicit_external_projects()
Andy Gibbs3ef5ed12013-06-26 08:05:08 +000076endif()
Michael J. Spencer93c9b2e2010-09-13 23:59:48 +000077
78set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)