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

Better CMake use of find_clang.cr #51

Open
docelic opened this issue May 15, 2020 · 0 comments
Open

Better CMake use of find_clang.cr #51

docelic opened this issue May 15, 2020 · 0 comments

Comments

@docelic
Copy link
Collaborator

docelic commented May 15, 2020

Currently, CMake calls find_clang.cr 3 times and also parses its stdout.
This causes the cmake run time to be longer than needed, and also it makes find_clang.cr unable to print meaningful debug/info messages because its output is parsed directly.

We can improve this in the following way:

  1. Make CMake call find_clang.cr only once
  2. Make find_clang.cr generate all of its content at once and dump it into various files on disk. (Currently it already generates 3 files, but it could generate at least 2 more - one with one for output of --print-clang-libs and one for output of --print-llvm-libs)
  3. CMake should then read in those file
  4. find_clang.cr will then be able to print info/notices to stdout, such as the value of its autodiscovery of BINDGEN_DYNAMIC setting as well as the paths/filenames of all the files it has generated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant