<div class="gmail_extra"><div class="gmail_quote">On Wed, Apr 25, 2012 at 2:14 PM, Michael Spencer <span dir="ltr"><<a href="mailto:bigcheesegs@gmail.com" target="_blank">bigcheesegs@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
While making lld build under the tools directory I decided to refactor how this<br>
works.<br>
<br>
There is now a macro, add_llvm_external_tool, which takes the name of the<br>
expected subdirectory. This sets up two CMake options.<br></blockquote><div><br></div><div>Could you generalize this a bit?</div><div><br></div><div>I'd rather: add_llvm_external_project(...)</div><div><br></div><div>
Then have it pick the default sourcedir based on the current directory when this macro is invoked and the project name.</div><div><br></div><div>We should be able to use this for compiler-rt, libc++, maybe even the testsuite if that were ever ported to CMake.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
  * LLVM_EXTERNAL_${NAME}_SOURCE_DIR<br>
      This is the path to the source. It defaults to tools/${name}.<br>
  * LLVM_EXTERNAL_${NAME}_BUILD<br>
      Enable and disable building the tool as part of LLVM.<br>
<br>
I chose LLVM_EXTERNAL_${NAME} as a prefix so they all show up together in the<br>
GUI.<br>
<span class="HOEnZb"><font color="#888888"><br>
- Michael Spencer<br>
</font></span></blockquote></div><br></div>