Caio/modules#1337
Conversation
|
In favor of keeping this PR well scoped, I think an attempt to reconcile STL injection + modules should not be made here. Instead a separate PR should be done for that functionality. |
* Make EnTT consumable as C++ module * Added `ENTT_MODULE` CMake option enabling EnTT compilation as C++ module * Added `ENTT_USER_CONFIG` CMake option to be able to specify C++ config defines
That's fair. We still need to fix the conflicts though, and thanks for pointing this to |
6657430 to
d70ac5e
Compare
I don't think this is going to be able to be release-able in the next |
|
Pinging you two to let you know that this branch should be stable / usable now for modules, since you guys showed interested in #1290. I have tested it on my machine with GCC 16.1.1 / CMake 4.4. |
Thank you very much. Unfortunately I reverted the use of modules in my project, since there were too many bugs in MSVC with VS2022. I will visit this again when I can upgrade to VS2026. |
db778d8 to
4d0800d
Compare
Not a big deal. Let's see how it goes. I started a run on the CI to know where we are. 👍 |
This PR is for finish the work @MilanBorovy started with #1290 to get C++ 20 modules working with EnTT.
I will rebase it against
wipdue to the STL injection changes causing a massive merge conflict.Original PR text
I've [@MilanBorovy] noticed that similar pull rq is already ongoing but seems to be dead for a few months.
Instead of exporting symbols in separate files, export macros are used (similar to how fmt does it).
By setting
ENTT_MODULECMake option to ON theEnTT::EnTTtarget becomes module library allowingEnTTto be consumed asimport entt;.Another option
ENTT_USER_CONFIGis added toCMake. It can be used to configure entt as on can't simply #define all configurations inside source with modules.Usage example:
entt_config.hpp
CMakeLists.txt
Some explanation of this would be nice to put in wiki, unfortunately I [@MilanBorovy] can't pull request changes to wiki AFAIK.