2011-01-20 07:39:06 +01: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 03:08:49 +02:00
|
|
|
|
2010-10-30 02:54:26 +02: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 01:59:48 +02:00
|
|
|
if( NOT WIN32 OR MSYS OR CYGWIN )
|
2011-12-01 21:18:09 +01:00
|
|
|
# We currently require 'sed' to build llvm-config, so don't try to build it
|
2011-12-01 11:50:19 +01:00
|
|
|
# on pure Win32.
|
2011-12-01 21:18:09 +01:00
|
|
|
add_subdirectory(llvm-config)
|
2010-09-14 01:59:48 +02:00
|
|
|
endif()
|
|
|
|
|
2008-09-22 03:08:49 +02:00
|
|
|
add_subdirectory(opt)
|
|
|
|
add_subdirectory(llvm-as)
|
|
|
|
add_subdirectory(llvm-dis)
|
2009-06-19 01:04:45 +02:00
|
|
|
add_subdirectory(llvm-mc)
|
2008-09-22 03:08:49 +02:00
|
|
|
|
|
|
|
add_subdirectory(llc)
|
|
|
|
add_subdirectory(llvm-ranlib)
|
|
|
|
add_subdirectory(llvm-ar)
|
|
|
|
add_subdirectory(llvm-nm)
|
2011-09-28 22:57:46 +02:00
|
|
|
add_subdirectory(llvm-size)
|
2008-09-22 03:08:49 +02:00
|
|
|
|
2011-12-07 21:54:41 +01:00
|
|
|
add_subdirectory(llvm-cov)
|
2008-09-22 03:08:49 +02:00
|
|
|
add_subdirectory(llvm-prof)
|
|
|
|
add_subdirectory(llvm-link)
|
|
|
|
add_subdirectory(lli)
|
|
|
|
|
|
|
|
add_subdirectory(llvm-extract)
|
2010-08-24 11:16:51 +02:00
|
|
|
add_subdirectory(llvm-diff)
|
2010-11-27 06:58:44 +01:00
|
|
|
add_subdirectory(macho-dump)
|
2011-01-20 07:39:06 +01:00
|
|
|
add_subdirectory(llvm-objdump)
|
2012-03-01 02:36:50 +01:00
|
|
|
add_subdirectory(llvm-readobj)
|
2011-03-18 18:11:39 +01:00
|
|
|
add_subdirectory(llvm-rtdyld)
|
2011-09-13 21:42:23 +02:00
|
|
|
add_subdirectory(llvm-dwarfdump)
|
2008-09-22 03:08:49 +02:00
|
|
|
|
|
|
|
add_subdirectory(bugpoint)
|
2010-08-08 02:50:57 +02:00
|
|
|
add_subdirectory(bugpoint-passes)
|
2008-09-22 03:08:49 +02:00
|
|
|
add_subdirectory(llvm-bcanalyzer)
|
2012-02-26 09:35:53 +01:00
|
|
|
add_subdirectory(llvm-stress)
|
2008-10-26 02:52:09 +02:00
|
|
|
|
2011-03-13 04:06:59 +01:00
|
|
|
if( NOT WIN32 )
|
|
|
|
add_subdirectory(lto)
|
|
|
|
endif()
|
|
|
|
|
2011-04-28 10:18:22 +02:00
|
|
|
if( LLVM_ENABLE_PIC )
|
|
|
|
# TODO: support other systems:
|
|
|
|
if( CMAKE_SYSTEM_NAME STREQUAL "Linux" )
|
|
|
|
add_subdirectory(gold)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2011-10-16 04:54:33 +02: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 01:49:55 +02:00
|
|
|
option(LLVM_BUILD_CLANG "Whether to build Clang as part of LLVM" ON)
|
|
|
|
if (${LLVM_BUILD_CLANG})
|
2011-10-16 13:50:37 +02:00
|
|
|
add_subdirectory(${LLVM_CLANG_SOURCE_DIR} clang)
|
2011-07-15 01:49:55 +02:00
|
|
|
endif()
|
2011-10-16 04:54:33 +02:00
|
|
|
endif ()
|
2010-09-14 01:59:48 +02:00
|
|
|
|
|
|
|
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)
|