Xmake uses .mpp as the default module extension, but also supports .ixx, .cppm, .mxx, etc. It fully supports C++20 Modules with gcc11/clang/msvc, and can automatically analyze module dependencies for maximum parallel compilation.
Exporting classes in modules:
Using module partitions:
Creating a shared library with modules:
Modules dependency between targets:
Using private module fragment to hide implementation details:
Separating module interface and implementation:
Using export import to aggregate submodules:
From v2.7.1, Headerunits are supported. Normally, at least one .mpp file is needed to enable modules, but you can also force it:
See headerunits example for how to use STL or custom headers as headerunits.
Support for C++23 stdmodules:
Define and distribute a C++ Modules package:
Quickly integrate with add_requires("foo"):
More official examples: C++ Modules Examples