It’s great to finally see modules support in CMake, as it’s the most used build system. The UX as described in the blog post is abysmal, but they said this will improve once compilers catch up.
That said, it’s such a sad state that gcc still doesn’t support them. Modules were the feature of C++20 I was looking forward to and now C++23 is all but done and modules are still not easily usable.
My days of using C++ for personal projects are pretty much over at this point, but some past version of me is still excited. Who knows, maybe I’ll even use modules at work before this decade is over
The UX as described in the blog post is abysmal, but they said this will improve once compilers catch up. That said, it’s such a sad state that gcc still doesn’t support them.
To be precise, GCC supports C++20 modules but it’s still quite buggy. What GCC does not support is the “pre-scan” model of build system integration as used by CMake. But it does support the “module mapper” model. We use this model in build2 and it allows us to support quite a few more module features that are not mentioned in the CMake article (such as importation of headers and automatic include translation). If interested, you can read more here: https://build2.org/blog/build2-cxx20-modules-gcc.xhtml
It’s great to finally see modules support in CMake, as it’s the most used build system. The UX as described in the blog post is abysmal, but they said this will improve once compilers catch up. That said, it’s such a sad state that gcc still doesn’t support them. Modules were the feature of C++20 I was looking forward to and now C++23 is all but done and modules are still not easily usable.
My days of using C++ for personal projects are pretty much over at this point, but some past version of me is still excited. Who knows, maybe I’ll even use modules at work before this decade is over
To be precise, GCC supports C++20 modules but it’s still quite buggy. What GCC does not support is the “pre-scan” model of build system integration as used by CMake. But it does support the “module mapper” model. We use this model in
build2
and it allows us to support quite a few more module features that are not mentioned in the CMake article (such as importation of headers and automatic include translation). If interested, you can read more here: https://build2.org/blog/build2-cxx20-modules-gcc.xhtml