[cfe-dev] [PATCH 0/2][CMake] Availability of out-of-source-tree clang from llvm

NAKAMURA Takumi geek4civic at gmail.com
Thu Oct 13 16:01:55 PDT 2011


On Windows, I have met problems to locate "clang" repository onto tools/clang,
Especially, it would be better "clang" would not be located in
llvm/tools in some opportunities.
Yes, I am constructing synthesized meta-repository including both llvm
and clang.

Symlink-like features would not work better with cmake, GNU make etc.

Then, I propose an easier way to be available to refer to
out-of-source-tree clang.

1) By default, tools/clang is assumed.
2) To set LLVM_CLANG_SOURCE_DIR, you can specify clang source tree
wherever you like. (It points tools/clang by default)
3) To set LLVM_CLANG_SOURCE_DIR as empty or invalid, you can suppress
building clang. Then, LLVM_BUILD_CLANG could be deprecated.
X) Wherever clang source tree is, clang is built under tools/clang.

NAKAMURA Takumi (2):
  CMake: Introduce LLVM_CLANG_SOURCE_DIR, "tools/clang" by default.
    Clang will not be built if LLVM_CLANG_SOURCE_DIR="" or
    ${LLVM_CLANG_SOURCE_DIR}/CMakeLists.txt is not found.
  Deprecate LLVM_BUILD_CLANG. You can skip building clang to define
    LLVM_BUILD_CLANG="" instead.

 docs/CMake.html      |    5 +++++
 tools/CMakeLists.txt |   12 ++++++------
 2 files changed, 11 insertions(+), 6 deletions(-)


More information about the cfe-dev mailing list