2011-01-20 14:39:06 +08:00
|
|
|
# NOTE: The tools are organized into groups of four consisting of one large and
|
|
|
|
# three small executables. This is done to minimize memory load in parallel
|
|
|
|
# builds. Please retain this ordering.
|
2008-09-22 09:08:49 +08:00
|
|
|
|
2010-10-30 08:54:26 +08:00
|
|
|
# If polly exists and is not disabled compile it and add it to the LLVM tools.
|
|
|
|
option(LLVM_BUILD_POLLY "Compile polly" ON)
|
|
|
|
if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/polly/CMakeLists.txt )
|
|
|
|
if (LLVM_BUILD_POLLY)
|
|
|
|
add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/polly)
|
|
|
|
endif (LLVM_BUILD_POLLY)
|
|
|
|
endif( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/polly/CMakeLists.txt )
|
|
|
|
|
2010-09-14 07:59:48 +08:00
|
|
|
if( NOT WIN32 OR MSYS OR CYGWIN )
|
2011-12-02 04:18:09 +08:00
|
|
|
# We currently require 'sed' to build llvm-config, so don't try to build it
|
2011-12-01 18:50:19 +08:00
|
|
|
# on pure Win32.
|
2011-12-02 04:18:09 +08:00
|
|
|
add_subdirectory(llvm-config)
|
2010-09-14 07:59:48 +08:00
|
|
|
endif()
|
|
|
|
|
2008-09-22 09:08:49 +08:00
|
|
|
add_subdirectory(opt)
|
|
|
|
add_subdirectory(llvm-as)
|
|
|
|
add_subdirectory(llvm-dis)
|
2009-06-19 07:04:45 +08:00
|
|
|
add_subdirectory(llvm-mc)
|
2008-09-22 09:08:49 +08:00
|
|
|
|
|
|
|
add_subdirectory(llc)
|
|
|
|
add_subdirectory(llvm-ranlib)
|
|
|
|
add_subdirectory(llvm-ar)
|
|
|
|
add_subdirectory(llvm-nm)
|
2011-09-29 04:57:46 +08:00
|
|
|
add_subdirectory(llvm-size)
|
2008-09-22 09:08:49 +08:00
|
|
|
|
|
|
|
add_subdirectory(llvm-ld)
|
2011-12-08 04:54:41 +08:00
|
|
|
add_subdirectory(llvm-cov)
|
2008-09-22 09:08:49 +08:00
|
|
|
add_subdirectory(llvm-prof)
|
|
|
|
add_subdirectory(llvm-link)
|
|
|
|
add_subdirectory(lli)
|
|
|
|
|
|
|
|
add_subdirectory(llvm-extract)
|
2010-08-24 17:16:51 +08:00
|
|
|
add_subdirectory(llvm-diff)
|
2010-11-27 13:58:44 +08:00
|
|
|
add_subdirectory(macho-dump)
|
2011-01-20 14:39:06 +08:00
|
|
|
add_subdirectory(llvm-objdump)
|
2011-03-19 01:11:39 +08:00
|
|
|
add_subdirectory(llvm-rtdyld)
|
2011-09-14 03:42:23 +08:00
|
|
|
add_subdirectory(llvm-dwarfdump)
|
2008-09-22 09:08:49 +08:00
|
|
|
|
|
|
|
add_subdirectory(bugpoint)
|
2010-08-08 08:50:57 +08:00
|
|
|
add_subdirectory(bugpoint-passes)
|
2008-09-22 09:08:49 +08:00
|
|
|
add_subdirectory(llvm-bcanalyzer)
|
|
|
|
add_subdirectory(llvm-stub)
|
2008-10-26 08:52:09 +08:00
|
|
|
|
2011-03-13 11:06:59 +08:00
|
|
|
if( NOT WIN32 )
|
|
|
|
add_subdirectory(lto)
|
|
|
|
endif()
|
|
|
|
|
2011-04-28 16:18:22 +08:00
|
|
|
if( LLVM_ENABLE_PIC )
|
|
|
|
# TODO: support other systems:
|
|
|
|
if( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
|
|
|
|
add_subdirectory(gold)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2011-10-16 10:54:33 +08:00
|
|
|
set(LLVM_CLANG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/clang" CACHE PATH "Path to Clang source directory")
|
|
|
|
|
|
|
|
if (NOT ${LLVM_CLANG_SOURCE_DIR} STREQUAL ""
|
|
|
|
AND EXISTS ${LLVM_CLANG_SOURCE_DIR}/CMakeLists.txt)
|
2011-07-15 07:49:55 +08:00
|
|
|
option(LLVM_BUILD_CLANG "Whether to build Clang as part of LLVM" ON)
|
|
|
|
if (${LLVM_BUILD_CLANG})
|
2011-10-16 19:50:37 +08:00
|
|
|
add_subdirectory(${LLVM_CLANG_SOURCE_DIR} clang)
|
2011-07-15 07:49:55 +08:00
|
|
|
endif()
|
2011-10-16 10:54:33 +08:00
|
|
|
endif ()
|
2010-09-14 07:59:48 +08:00
|
|
|
|
|
|
|
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)
|