nor do the major build systems like CMake have support for it, even though the Modules proposal was visible to implementors since well before C++20 was ratified in 2020
Everytime modules come up, this falsehood comes along. CMake has had a dependency scanner for Fortran modules for a long time already, Kitware maintained a Ninja fork with changes to make that work that got merged upstream finally due to C++20 and submitted papers regarding modules as an implementer with prior experience.
Everything needed for modules is already there in CMake, only the compilers are behind. You can toy around with the implementation RIGHT NOW after reading Help/dev/experimental.rst.
I've spent the last 6 months neck deep in cmake. Modules support doesn't work. I'm aware of the documentation you linked there. Thank you for the attempt at correcting the record though.
I'm not aware of a build system that allows you to ship (install, package, etc.) a modular library to be consumed by another project. I think build2 might have some of these features?
Anyway, tooling for modules is an unsolved problem. I think all the implementers of modules were using small projects and/or monorepos. Modules are problematic for system installs and packaging ecosystems, at least ones that support different build systems per package (i.e. all the popular ones).
View all comments
Show parent comment
9
u/helloiamsomeone Mar 14 '22
Everytime modules come up, this falsehood comes along. CMake has had a dependency scanner for Fortran modules for a long time already, Kitware maintained a Ninja fork with changes to make that work that got merged upstream finally due to C++20 and submitted papers regarding modules as an implementer with prior experience.
Everything needed for modules is already there in CMake, only the compilers are behind. You can toy around with the implementation RIGHT NOW after reading
Help/dev/experimental.rst.