xmake-cxx-modules
Installation
SKILL.md
Building C++20 Modules with Xmake
Xmake has first-class C++20 modules support across GCC, Clang, and MSVC. It handles the BMI (Built Module Interface) cache, dependency scanning, and per-compiler flag differences automatically — you mostly just point it at the files and enable the policy.
1. Prerequisites
- C++20 language version.
- A new-ish compiler: GCC 14+, Clang 16+ (better: 17+), MSVC 19.34+ (VS 2022 17.4+).
build.c++.modulespolicy enabled.
2. Minimal executable with modules
Project layout: