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.
5 # If polly exists and is not disabled compile it and add it to the LLVM tools.
6 option(LLVM_BUILD_POLLY "Compile polly" ON)
7 if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/polly/CMakeLists.txt )
9 add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/polly)
10 endif (LLVM_BUILD_POLLY)
11 endif( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/polly/CMakeLists.txt )
13 if( NOT WIN32 OR MSYS OR CYGWIN )
14 # We currently require 'sed' to build llvm-config, so don't try to build it
16 add_subdirectory(llvm-config)
20 add_subdirectory(llvm-as)
21 add_subdirectory(llvm-dis)
22 add_subdirectory(llvm-mc)
25 add_subdirectory(llvm-ranlib)
26 add_subdirectory(llvm-ar)
27 add_subdirectory(llvm-nm)
28 add_subdirectory(llvm-size)
30 add_subdirectory(llvm-ld)
31 add_subdirectory(llvm-cov)
32 add_subdirectory(llvm-prof)
33 add_subdirectory(llvm-link)
36 add_subdirectory(llvm-extract)
37 add_subdirectory(llvm-diff)
38 add_subdirectory(macho-dump)
39 add_subdirectory(llvm-objdump)
40 add_subdirectory(llvm-rtdyld)
41 add_subdirectory(llvm-dwarfdump)
43 add_subdirectory(bugpoint)
44 add_subdirectory(bugpoint-passes)
45 add_subdirectory(llvm-bcanalyzer)
46 add_subdirectory(llvm-stub)
53 # TODO: support other systems:
54 if( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
55 add_subdirectory(gold)
59 set(LLVM_CLANG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/clang" CACHE PATH "Path to Clang source directory")
61 if (NOT ${LLVM_CLANG_SOURCE_DIR} STREQUAL ""
62 AND EXISTS ${LLVM_CLANG_SOURCE_DIR}/CMakeLists.txt)
63 option(LLVM_BUILD_CLANG "Whether to build Clang as part of LLVM" ON)
64 if (${LLVM_BUILD_CLANG})
65 add_subdirectory(${LLVM_CLANG_SOURCE_DIR} clang)
69 set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)