[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)
commit700cd4053a51eb255c3312b5567824d6a73ef171
tree47f64ab7f0b2dddc081af9174922b4b4e872466b
parente3612f0f2103ad9c15ed2b6a903d5f20c5d8f918
[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

llvm-svn: 165311
llvm/cmake/modules/AddLLVM.cmake