[CMake] clang/tools/extra may be included by LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 10 Oct 2012 13:46:18 +0000 (13:46 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 10 Oct 2012 13:46:18 +0000 (13:46 +0000)
LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=/path/to/llvm-srcroot/tools/clang/tools/extra, by default.

llvm-svn: 165620

clang/tools/CMakeLists.txt

index 3a6fef5..cccff5d 100644 (file)
@@ -10,7 +10,5 @@ add_subdirectory(clang-check)
 # subdirectory. It contains tools developed as part of the Clang/LLVM project
 # on top of the Clang tooling platform. We keep them in a separate repository
 # to keep the primary Clang repository small and focused.
-if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/extra AND
-   EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/extra/CMakeLists.txt)
-  add_subdirectory(extra)
-endif()
+# It also may be included by LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR.
+add_llvm_external_project(clang-tools-extra extra)