<div dir="ltr"><div>Hi,<br></div><div><br></div><div>I believe you are correct. I'm certain that for LLVM and Clang is absolutely does not matter how you build them (in different circumstances, I built them with both methods). However, Clang tools require a CompilationDatabase, which can either be populated manually from other sources (where I work, we use a custom file format for this) or from the somewhat more convenient JSON compilation database that CMake is able to generate automatically. (There also exists another tool which is capable of generating such a .json file even when you're not using CMake - I don't remember the name, but I found a reference to it in the Clang documentation somewhere.)</div>
<div><br></div><div>So yeah, it does not matter how you build Clang, and neither does it matter how you build the target application - all that matters is that you need a CompilationDatabase for Clang to be able to work its magic.</div>
<div><br></div><div>Gabor</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/25 Peeter Joot <span dir="ltr"><<a href="mailto:peeter.joot@gmail.com" target="_blank">peeter.joot@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I've built and installed clang, but did so in the "typical" unix way:<br><br>mkdir build<br>
cd build<div>../llvm/configure --prefix=...<br>make <br>make install<br><br>The libtooling instructions here say that to use libtooling, you have to build clang using CMake:</div>
<div><br></div><div><a href="http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html" target="_blank">http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html</a></div><div><br></div><div>However, it appears all the libtooling stuff is already build by the make that I've invoked, so I wouldn't think that I have to re-build clang a second time to use libtooling.</div>
<div><br></div><div>Is the cmake dependency for clang tools just the requirement to generate this compilation database (this .json file). If so, wouldn't the requirement be to do this for the project code that I want to run the tools on, not the clang or llvm build tree itself?</div>
<span class="HOEnZb"><font color="#888888">
<div><br></div><div>-- <br>Peeter
</div></font></span></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>