aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-07-14 23:49:55 +0000
committerDouglas Gregor <dgregor@apple.com>2011-07-14 23:49:55 +0000
commite696436a7ef32d892e3f76f38e84146dacc232b5 (patch)
treeb3b30c7d538829e5e9e747af9d340b3e31b91d13
parent4bb5b037126ea35f35d5a490b03ccffa8677fa5e (diff)
downloadexternal_llvm-e696436a7ef32d892e3f76f38e84146dacc232b5.zip
external_llvm-e696436a7ef32d892e3f76f38e84146dacc232b5.tar.gz
external_llvm-e696436a7ef32d892e3f76f38e84146dacc232b5.tar.bz2
CMake: Add a new configuration option LLVM_BUILD_CLANG that's
available when Clang is found within the LLVM tree. If enabled (the default), Clang will be built as part of LLVM. If disabled, Clang will be skipped... and can be built by configuring a separate object directory just for Clang. This helps break up the monolithic LLVM+Clang project that many Clang developers use, improving build/load times. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135218 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index c9072a7..8851a0b 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -59,7 +59,10 @@ if( LLVM_ENABLE_PIC )
endif()
if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt )
- add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/clang )
+ option(LLVM_BUILD_CLANG "Whether to build Clang as part of LLVM" ON)
+ if (${LLVM_BUILD_CLANG})
+ add_subdirectory( ${CMAKE_CURRENT_SOURCE_DIR}/clang )
+ endif()
endif( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/clang/CMakeLists.txt )
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)