kimgr wrote: I think at the time we started doing this, Clang's builtin includes lookup basically did `$dirname($0)/../lib/llvm-$version/clang/$version/include`. So when building `include-what-you-use` in a separate tree, the resulting binary didn't have the builtin headers in the right place, and we wouldn't be able to run tests.
We support three build modes: * as part of LLVM+Clang with `LLVM_EXTERNAL_PROJECTS=iwyu` and `LLVM_EXTERNAL_IWYU_SOURCE_DIR` * with `CMAKE_PREFIX_PATH` pointing to a package-installed LLVM+Clang * with `CMAKE_PREFIX_PATH` pointing to an LLVM+Clang build tree In the first case, depending on the `Headers` target makes sure all headers are copied into the build tree. For the latter two we synthesize a `Headers` target (because it's not exported) based on the Clang resource dir. https://github.com/llvm/llvm-project/pull/97197 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits