That problem is resolved using a different CMakeLists. I am having a slightly different problem now. The tool works now but when it is giving an error:<div><br></div><div>#include <stddef.h> not found</div><div><br></div>
<div>I checked the directories using -v and two directories namely "../lib/clang/3.2/include" and "/include" were not found. As you can see, these paths are wrong. They should be "/usr/local/lib/clang.." and "/usr/include". How can I fix this? </div>
<div><br></div><div>The second problem is that I want to run this tool on a source file rather than code given through command line. How do I do that? I also want to retain the original locations in the source file so that I can rewrite to it.</div>
<div><br></div><div>Regards.</div><div>Adil</div><div><br><div class="gmail_quote">On Fri, Oct 19, 2012 at 8:26 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Fri, Oct 19, 2012 at 3:52 AM, madil90 <<a href="mailto:madil90@gmail.com">madil90@gmail.com</a>> wrote:<br>

> Hi,<br>
>    I am trying to setup LibTooling for clang. I have gone through the<br>
> procedure given at </a><br>
> <<a href="http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html" target="_blank">http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html</a>> . I can<br>
> succesfully run clang-check for any source file. I am now trying to compile<br>
> the example at  </a> <<a href="http://clang.llvm.org/docs/RAVFrontendAction.html" target="_blank">http://clang.llvm.org/docs/RAVFrontendAction.html</a>> .<br>
> When using cmake, I get the following error:<br>
><br>
> Unknown CMake command : add_clang_executable<br>
><br>
>   When using cmake to build clang, I used -DEXPORT_CMAKE_COMPILE_COMMANDS=ON<br>
> variable as suggested. Then why isn't this command working?<br>
<br>
</div>My best guess would be that you don't have a version of cmake that<br>
supports this command, but I don't really know. This functionality was<br>
only added (to both Clang an CMake) in the last 6 months or so.<br>
<br>
><br>
> Regards,<br>
> Adil<br>
><br>
><br>
<span class="HOEnZb"><font color="#888888">><br>
> --<br>
> View this message in context: <a href="http://clang-developers.42468.n3.nabble.com/LibTooling-CMake-Error-tp4027570.html" target="_blank">http://clang-developers.42468.n3.nabble.com/LibTooling-CMake-Error-tp4027570.html</a><br>

> Sent from the Clang Developers mailing list archive at Nabble.com.<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>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Mohammad Adil<div>LUMS SSE</div><br>
</div>