[cfe-dev] Out-of-tree CMake dependencies
Kim Gräsman via cfe-dev
cfe-dev at lists.llvm.org
Wed Oct 4 11:39:19 PDT 2017
In include-what-you-use, we recently had this bug report:
And it's symptomatic for a whole class of problems where we're
duplicating knowledge from the LLVM/Clang CMake systems to allow both
in-tree and out-of-tree IWYU development.
(in our terminology, in-tree == cloning the include-what-you-use repo
into a full LLVM and Clang checkout/clone under
llvm/tools/clang/tools/include-what-you-use and out-of-tree == cloning
include-what-you-use anywhere, and giving CMake information about
where to find LLVM/Clang headers and libraries)
Looking around my system, I see a lot of CMake modules in
/usr/lib/llvm-4.0 and /usr/share/llvm-4.0, but it's not clear to me
how to use them. Also, it would be nice to allow a "next-to-tree"
configuration instead of in-tree, where I can point IWYU at a trunk
checkout of LLVM and Clang and use its CMake modules.
Is there a correct way to accomplish this?
More information about the cfe-dev