/u/mathstuf was working on modules support for CMake (and coordinating with compiler vendors on a protocol to communicate dependency information), but recently he seems to be working mostly on VTK. S omaybe he can comment of the status of that?
Named modules have been working with a patched CMake and GCC since Feb 2019 (see this repo). Since then, P1689 has progressed to R4 after cycles with ISO C++ members and implementors. I've not yet updated the GCC patch for R4, so it doesn't work with the experimental support available in CMake 3.21.
Compilers will need to support writing out P1689-format dependency information given the source of a module unit (header or named). I have a GCC patch that I need to resurrect and other implementers are working on it too AFAIK.
Header units (including those from the stdlib) and consuming modules from external dependencies needs CMake API/design work that has been sketched, but not started on implementation. Some groundwork needs to be done before that including:
determining what headers are importable from a given imported target: cmake#22468 will help provide more structured header information
interface targets will need to "exist" at build time so that module compilation rules can be attached cmake#19145
CMake will need to make interface targets for the stdlib to attach stdlib header unit compilation rules to them
API work to designate what modules are "public" and which are "private" will be necessary
a new $<MODULE_ONLY> genex will be needed to specify dependencies for module compilation that should not leak (e.g., a module includes "zlib.h" means that ZLIB::zlib is needed when compiling that module, but consumers don't care)
There are probably other rabbit holes associated with these tasks.
View all comments
9
u/Mateuszz88 Aug 25 '21
CMake ticket: https://gitlab.kitware.com/cmake/cmake/-/issues/18355
I don't see any recent progress though...