summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2015-11-11 16:14:03 +0000
committerChris Bieneman <beanz@apple.com>2015-11-11 16:14:03 +0000
commit7f75644664ac8429783509553912515ff06708c7 (patch)
tree6670305f0ba582d3d1b52e2f040727a0abb2e9b2 /CMakeLists.txt
parent7fd5a38591282a61e6327a2945bc6df36f9165dd (diff)
[CMake] Add support for building the llvm test-suite as part of an LLVM build using clang and lld
Summary: This patch adds a new CMake module for working with ExternalProjects. This wrapper for ExternalProject supports using just-built tools and can hook up dependencies properly so that projects get cleared out. The example usage here is for the llvm test-suite. In this example, the test-suite is setup as dependent on clang and lld if they are in-tree. If the clang or lld binaries change the test-suite is re-configured, cleaned, and rebuilt. This cleanup and abstraction wrapping ExternalProject can be extended and applied to other runtime libraries like compiler-rt and libcxx. Reviewers: samsonov, jroelofs, rengolin, jmolloy Subscribers: jmolloy, llvm-commits Differential Revision: http://reviews.llvm.org/D14513 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252747 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6659e535444..fc46413640c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -683,6 +683,13 @@ if( LLVM_INCLUDE_EXAMPLES )
endif()
if( LLVM_INCLUDE_TESTS )
+ if(EXISTS ${LLVM_MAIN_SRC_DIR}/projects/test-suite AND TARGET clang)
+ include(LLVMExternalProjectUtils)
+ llvm_ExternalProject_Add(test-suite ${LLVM_MAIN_SRC_DIR}/projects/test-suite
+ USE_TOOLCHAIN
+ EXCLUDE_FROM_ALL
+ NO_INSTALL)
+ endif()
add_subdirectory(test)
add_subdirectory(unittests)
if (MSVC)