[llvm-commits] [CMake] Restructure how Clang, Polly and other external tools get included.

Chandler Carruth chandlerc at google.com
Thu Apr 26 11:12:39 PDT 2012


On Wed, Apr 25, 2012 at 2:14 PM, Michael Spencer <bigcheesegs at gmail.com>wrote:

> While making lld build under the tools directory I decided to refactor how
> this
> works.
>
> There is now a macro, add_llvm_external_tool, which takes the name of the
> expected subdirectory. This sets up two CMake options.
>

Could you generalize this a bit?

I'd rather: add_llvm_external_project(...)

Then have it pick the default sourcedir based on the current directory when
this macro is invoked and the project name.

We should be able to use this for compiler-rt, libc++, maybe even the
testsuite if that were ever ported to CMake.


>
>  * LLVM_EXTERNAL_${NAME}_SOURCE_DIR
>      This is the path to the source. It defaults to tools/${name}.
>  * LLVM_EXTERNAL_${NAME}_BUILD
>      Enable and disable building the tool as part of LLVM.
>
> I chose LLVM_EXTERNAL_${NAME} as a prefix so they all show up together in
> the
> GUI.
>
> - Michael Spencer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120426/b4cdafa9/attachment.html>


More information about the llvm-commits mailing list