CMM is a C++ module mapper. It tells the compiler where in the filesystem to look for and put compiled modules. It's intended use case is caching compiled system modules and reusing them across projects, speeding up compilation and saving disk space.
Usage
Some small utilities are provided for convenience:
- cmm_run starts a CMM daemon with reasonable(?) arguments, or
- A systemd unit template which will start the daemon
automatically with the same arguments as cmm_run. Run:
make install-all(to install the unit template) andsystemctl --user enable --now cmm@$(systemd-escape c++20)to enable it for C++20. - gm++ is a wrapper around GCC which shows the necessary compiler flags to interface with CMM, using the same conventions as in cmm_run.
See cmm --help for more information.
Building
make release
make install
Resources
TODO
- Better support for different language standards of C++, this requires that the compiler provide us with the C++ language standards that it's compiling.
- Support for compiled user headers, this requires that the compiler provide us with its working directory.
- Escape /../ in user header paths.
- Compile system modules when they are missing (out of scope)