Add llvm-c-test tool for testing llvm-c
[oota-llvm.git] / tools / CMakeLists.txt
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.
4
5 add_llvm_tool_subdirectory(llvm-config)
6
7 add_llvm_tool_subdirectory(opt)
8 add_llvm_tool_subdirectory(llvm-as)
9 add_llvm_tool_subdirectory(llvm-dis)
10 add_llvm_tool_subdirectory(llvm-mc)
11
12 add_llvm_tool_subdirectory(llc)
13 add_llvm_tool_subdirectory(llvm-ar)
14 add_llvm_tool_subdirectory(llvm-nm)
15 add_llvm_tool_subdirectory(llvm-size)
16
17 add_llvm_tool_subdirectory(llvm-cov)
18 add_llvm_tool_subdirectory(llvm-link)
19 add_llvm_tool_subdirectory(lli)
20
21 add_llvm_tool_subdirectory(llvm-extract)
22 add_llvm_tool_subdirectory(llvm-diff)
23 add_llvm_tool_subdirectory(macho-dump)
24 add_llvm_tool_subdirectory(llvm-objdump)
25 add_llvm_tool_subdirectory(llvm-readobj)
26 add_llvm_tool_subdirectory(llvm-rtdyld)
27 add_llvm_tool_subdirectory(llvm-dwarfdump)
28 if( LLVM_USE_INTEL_JITEVENTS )
29   add_llvm_tool_subdirectory(llvm-jitlistener)
30 else()
31   ignore_llvm_tool_subdirectory(llvm-jitlistener)
32 endif( LLVM_USE_INTEL_JITEVENTS )
33
34 add_llvm_tool_subdirectory(bugpoint)
35 add_llvm_tool_subdirectory(bugpoint-passes)
36 add_llvm_tool_subdirectory(llvm-bcanalyzer)
37 add_llvm_tool_subdirectory(llvm-stress)
38 add_llvm_tool_subdirectory(llvm-mcmarkup)
39
40 add_llvm_tool_subdirectory(llvm-symbolizer)
41
42 if( NOT MSVC )
43   add_llvm_tool_subdirectory(llvm-c-test)
44 else()
45   ignore_llvm_tool_subdirectory(llvm-c-test)
46 endif( NOT MSVC )
47
48 add_llvm_tool_subdirectory(obj2yaml)
49 add_llvm_tool_subdirectory(yaml2obj)
50
51 if( NOT CYGWIN )
52   add_llvm_tool_subdirectory(lto)
53   add_llvm_tool_subdirectory(llvm-lto)
54 else()
55   ignore_llvm_tool_subdirectory(lto)
56   ignore_llvm_tool_subdirectory(llvm-lto)
57 endif()
58
59 if( LLVM_ENABLE_PIC )
60   # TODO: support other systems:
61   if( (CMAKE_SYSTEM_NAME STREQUAL "Linux")
62       OR (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") )
63     add_llvm_tool_subdirectory(gold)
64   else()
65     ignore_llvm_tool_subdirectory(gold)
66   endif()
67 else()
68   ignore_llvm_tool_subdirectory(gold)
69 endif()
70
71 add_llvm_external_project(clang)
72
73 if( NOT LLVM_INCLUDE_TOOLS STREQUAL "bootstrap-only" )
74   add_llvm_external_project(lld)
75   add_llvm_external_project(lldb)
76   add_llvm_external_project(polly)
77
78   # Automatically add remaining sub-directories containing a 'CMakeLists.txt'
79   # file as external projects.
80   add_llvm_implicit_external_projects()
81 endif()
82
83 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)