Neargye / magic_enum

Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code
MIT License
4.88k stars 434 forks source link

New include path format #310

Closed cpsauer closed 11 months ago

cpsauer commented 11 months ago

Hi @Neargye! Thanks again for a wonderful library.

I was looking at https://github.com/Neargye/magic_enum/commit/eb867ec9baaabc5b60816861923fdef53972cba2: is the intent to have users #include "magic_enum/..." (like for Bazel) or #include "magic_enum.hpp", (like in the cmake config)?

Either seems totally reasonable, but I happened across the inconsistency when updating (and needing to change my includes), so I figured you might want a friendly heads.

Thanks for all you do, Chris

Neargye commented 11 months ago

Hi, I think #include "magic_enum.hpp", I'll try to quickly fix it. Thanks for catch and create issues

Neargye commented 11 months ago

It seemed to me that I had configured this correctly in cmake this way #include "magic_enum.hpp", but with so many build systems I’m already a little confused, could you tell me where I'm wrong?

cpsauer commented 11 months ago

Sorry--I wrote the path <-> build systems mappings backwards above, but they are indeed inconsistent. (Have edited the original post so I don't confuse any future readers, but it was previously wrong.)

So to confirm: cmake is as you want, #include "magic_enum.hpp". I'm seeing you made the parallel change for meson in https://github.com/Neargye/magic_enum/commit/3c92e9035bbddd2a56eae09a04b2e9f6d59c1372. I've tossed up a quick PR #311 to make things consistent for Bazel (which is what I'm using and why I noticed). On a quick look, it seemed like those were all the build systems; if that's right #311 should resolve!

Thanks again for making a stupendous library and sharing it with the world!

Neargye commented 11 months ago

Thanks for your help!

cpsauer commented 11 months ago

My pleasure. Thanks again for being so great to work with, Daniil, and for putting in the work to share such a great library with the world.