[cfe-dev] Error in Tutorial for building tools using LibTooling and LibASTMatchers

Kim Gräsman kim.grasman at gmail.com
Mon Feb 4 05:28:17 PST 2013


Pedro,

On Mon, Feb 4, 2013 at 2:00 PM, Pedro Delgado Perez
<pedro.delgadoperez at mail.uca.es> wrote:
>
> Thank you very much, Manuel, but should I have to make again the rest of
> the instructions?
>
> I made what you told me and now, when I run
>
> cmake -G Ninja ../llvm -DLLVM_BUILD_TESTS=ON
>
> I get the next error:
>
> CMake Error: The source "/usr/llvm/llvm/CMakeLists.txt" does not match the
> source "/usr/llvm/CMakeLists.txt" used to generate cache.  Re-run cmake with
> a different source directory.

It still sounds like you have llvm checked out directly into the
top-level llvm directory.

You need a top-level directory that's with build and the llvm checkout
side-by-side, e.g.

~/dev/
  llvm-root/ <-- This is the top-level directory I'm talking about
    build/   <-- This is the build directory you create
    llvm/   <-- This is the checkout from SVN

If you follow the getting started instructions to the letter, this is
what you should have.

- Kim



More information about the cfe-dev mailing list