blob: 531b87151253282807e2b08cd2aa002220cf835a [file] [log] [blame]
Michael J. Spencer92e1deb2011-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 Fuentes3d01fc72008-09-22 01:08:49 +00004
Tobias Grosserbaaadb22010-10-30 00:54:26 +00005# If polly exists and is not disabled compile it and add it to the LLVM tools.
6option(LLVM_BUILD_POLLY "Compile polly" ON)
7if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/polly/CMakeLists.txt )
8 if (LLVM_BUILD_POLLY)
9 add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/polly)
10 endif (LLVM_BUILD_POLLY)
11endif( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/polly/CMakeLists.txt )
12
Michael J. Spencer3a210e22010-09-13 23:59:48 +000013if( NOT WIN32 OR MSYS OR CYGWIN )
14 # It is useful to build llvm-config before the other tools, so we
15 # have a fresh LibDeps.txt for regenerating the hard-coded library
16 # dependencies. llvm-config/CMakeLists.txt takes care of this but we
17 # must keep llvm-config as the first entry on the list of tools to
18 # be built.
19 add_subdirectory(llvm-config)
20endif()
21
Oscar Fuentes3d01fc72008-09-22 01:08:49 +000022add_subdirectory(opt)
23add_subdirectory(llvm-as)
24add_subdirectory(llvm-dis)
Chris Lattnerf9f065e2009-06-18 23:04:45 +000025add_subdirectory(llvm-mc)
Oscar Fuentes3d01fc72008-09-22 01:08:49 +000026
27add_subdirectory(llc)
28add_subdirectory(llvm-ranlib)
29add_subdirectory(llvm-ar)
30add_subdirectory(llvm-nm)
31
32add_subdirectory(llvm-ld)
33add_subdirectory(llvm-prof)
34add_subdirectory(llvm-link)
35add_subdirectory(lli)
36
Oscar Fuentes3d01fc72008-09-22 01:08:49 +000037add_subdirectory(llvm-extract)
John McCallb82b4332010-08-24 09:16:51 +000038add_subdirectory(llvm-diff)
Daniel Dunbar75373ac2010-11-27 05:58:44 +000039add_subdirectory(macho-dump)
Michael J. Spencer92e1deb2011-01-20 06:39:06 +000040add_subdirectory(llvm-objdump)
Jim Grosbach1cb19a42011-03-18 17:11:39 +000041add_subdirectory(llvm-rtdyld)
Benjamin Kramer72c0d7f2011-09-13 19:42:23 +000042add_subdirectory(llvm-dwarfdump)
Oscar Fuentes3d01fc72008-09-22 01:08:49 +000043
44add_subdirectory(bugpoint)
Rafael Espindola6b018372010-08-08 00:50:57 +000045add_subdirectory(bugpoint-passes)
Oscar Fuentes3d01fc72008-09-22 01:08:49 +000046add_subdirectory(llvm-bcanalyzer)
47add_subdirectory(llvm-stub)
Ted Kremenek0a6f0532010-04-13 20:52:50 +000048add_subdirectory(edis)
Oscar Fuentes63c956c2008-11-25 22:18:49 +000049add_subdirectory(llvmc)
Oscar Fuentes48ed0f52008-10-26 00:52:09 +000050
Oscar Fuentes98f6ddc2011-03-13 03:06:59 +000051if( NOT WIN32 )
52 add_subdirectory(lto)
53endif()
54
Chandler Carruthd7797492011-04-28 08:18:22 +000055if( LLVM_ENABLE_PIC )
56 # TODO: support other systems:
57 if( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
58 add_subdirectory(gold)
59 endif()
60endif()
61
Oscar Fuentes48ed0f52008-10-26 00:52:09 +000062if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt )
Douglas Gregore6964362011-07-14 23:49:55 +000063 option(LLVM_BUILD_CLANG "Whether to build Clang as part of LLVM" ON)
64 if (${LLVM_BUILD_CLANG})
65 add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/clang )
66 endif()
Michael J. Spencer3a210e22010-09-13 23:59:48 +000067endif( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt )
68
69set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)