[CMake] Enhance add_llvm_external_project.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 5 Oct 2012 14:10:17 +0000 (14:10 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Fri, 5 Oct 2012 14:10:17 +0000 (14:10 +0000)
commit1e10bd68f4f2e0514bc2979d760d41c827705e1e
tree5ae826b416727289a9b95306c356bb397811d484
parent0559d31c374050096e1071208661f97f24dbe299
[CMake] Enhance add_llvm_external_project.

  - Substitute hyphen to underscore, s/-/_/g, as the variable name.
  - Additional parameter can be specified as the name of directory.

e.g.) add_llvm_external_project(clang-tools-extra extra)

  - LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=/path/to/llvm-srcroot/tools/clang/tools/extra, by default.
  - Build directory is in ${CMAKE_CURRENT_BINARY_DIR}/extra

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165311 91177308-0d34-0410-b5e6-96231b3b80d8
cmake/modules/AddLLVM.cmake