blob: 71af21278101ef81bdcbbda52419e2b0c0a10f47 [file] [log] [blame]
Chris Bieneman580d8152015-07-20 20:36:06 +00001# This file will recurse into all subdirectories that contain CMakeLists.txt
2# Setting variables that match the pattern LLVM_TOOL_{NAME}_BUILD to Off will
3# prevent traversing into a directory.
4#
5# The only tools that need to be explicitly added are ones that have explicit
6# ordering requirements.
7
8# Iterates all the subdirectories to create CMake options to enable/disable
9# traversing each directory.
10create_llvm_tool_options()
Michael J. Spencer93c9b2e2010-09-13 23:59:48 +000011
Sebastian Popa59005b2014-03-14 04:04:14 +000012# Build polly before the tools: the tools link against polly when
13# LINK_POLLY_INTO_TOOLS is set.
14if(WITH_POLLY)
15 add_llvm_external_project(polly)
NAKAMURA Takumie1e52742014-11-10 15:03:02 +000016else()
Chris Bieneman580d8152015-07-20 20:36:06 +000017 set(LLVM_TOOL_POLLY_BUILD Off)
NAKAMURA Takumie1e52742014-11-10 15:03:02 +000018endif()
19
Chris Bieneman580d8152015-07-20 20:36:06 +000020if(NOT LLVM_BUILD_LLVM_DYLIB )
21 set(LLVM_TOOL_LLVM_SHLIB_BUILD Off)
Oscar Fuentesac824ee2011-03-13 03:06:59 +000022endif()
23
Chris Bieneman580d8152015-07-20 20:36:06 +000024if(NOT LLVM_USE_INTEL_JITEVENTS )
25 set(LLVM_TOOL_LLVM_JITLISTENER_BUILD Off)
26endif()
Chandler Carruth3f7b5812011-04-28 08:18:22 +000027
Chris Bieneman580d8152015-07-20 20:36:06 +000028if(CYGWIN OR NOT LLVM_ENABLE_PIC)
29 set(LLVM_TOOL_LTO_BUILD Off)
30 set(LLVM_TOOL_LLVM_LTO_BUILD Off)
31endif()
Andy Gibbs3ef5ed12013-06-26 08:05:08 +000032
Chris Bieneman69533a52015-06-22 21:58:02 +000033# Automatically add remaining sub-directories containing a 'CMakeLists.txt'
34# file as external projects.
Chris Bieneman580d8152015-07-20 20:36:06 +000035add_llvm_implicit_projects()
Michael J. Spencer93c9b2e2010-09-13 23:59:48 +000036
37set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)