Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmake] Expose clang resource dir to installed CMake #95747

Open
kimgr opened this issue Jun 17, 2024 · 2 comments
Open

[cmake] Expose clang resource dir to installed CMake #95747

kimgr opened this issue Jun 17, 2024 · 2 comments
Labels
clang Clang issues not falling into any other category cmake Build system in general and CMake in particular

Comments

@kimgr
Copy link
Contributor

kimgr commented Jun 17, 2024

In IWYU's build, we guess Clang's resource dir based on the CMAKE_PREFIX_PATH, so we can collect the builtin/resource headers for our own build tree. Unfotunately, depending on packaging/platform, the path to the resource dir varies quite a bit.

Is there any chance to expose something like CLANG_RESOURCE_DIR in ClangConfig.cmake?

It's not fully clear to me what the layering looks like there, but it feels like it should be possible.

Thanks!

@github-actions github-actions bot added the clang Clang issues not falling into any other category label Jun 17, 2024
@EugeneZelenko EugeneZelenko added the cmake Build system in general and CMake in particular label Jun 17, 2024
@kimgr
Copy link
Contributor Author

kimgr commented Jun 17, 2024

(I'd be happy to start on a patch, but I need a thread to start pulling on. Is there an example patch doing something similar to give me an idea what would need to change? Thanks!)

@kimgr
Copy link
Contributor Author

kimgr commented Aug 27, 2024

Eventually landed #103388 to support this. I'll ping back here once I have everything wired in IWYU and can explain how to do it properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category cmake Build system in general and CMake in particular
Projects
None yet
Development

No branches or pull requests

2 participants