Export CLANG_RESOURCE_DIR from ClangConfig.cmake (original) (raw)
Hello,
I recently opened
- issue: https://github.com/llvm/llvm-project/issues/95747
- draft PR: https://github.com/llvm/llvm-project/pull/97197
to try and garner some feedback on exporting the install-tree resource dir path in ClangConfig.cmake
.
To summarize, I do this because the IWYU build needs access to the builtin headers to be able to execute from our build tree. We currently jump through a few hoops to guess the path and copy the headers: https://github.com/include-what-you-use/include-what-you-use/blob/master/CMakeLists.txt#L54-L79
My CMake is weak, so I’m probably missing something. Does anybody think it’s a reasonable idea, or have suggestions for better solutions?
Thanks!