vnmakarov / mir

A lightweight JIT compiler based on MIR (Medium Internal Representation) and C11 JIT compiler and interpreter based on MIR
MIT License
2.24k stars 147 forks source link

Use separate directory for public headers #284

Closed qgymib closed 1 year ago

qgymib commented 1 year ago

Hi vanmakarov,

Thanks for your great work. I am integrating mir as a third_party project. But soon I found that it is not easy, at least for cmake based project, because it not following some details of cmake target-based rules:

  1. Public headers is not exported as public target property, which means I have to get it by some dirty trick.
  2. Compile flags was added globally, which affect parent project flags.
  3. Test code always compile unless disable by BUILD_TESTING
  4. Tools such as c2m always compile and there is no way to disable it.

This PR is for resolve problem 1, and if you are happy I can open another PR to fix the other things.

vnmakarov commented 1 year ago

Sorry for delay with the answer. I was away for 2 weeks. I'll try to review the patch during next 3 weeks (sorry I am busy next 2 weeks as participating in 2 conferences). Thank you for your interest in the project and your contribution.