A minimal working example of C++23 modules built with GCC 15.2, CMake 3.28, and Ninja 1.13.
No headers. No includes. Just import foo; and run.
Source article: https://www.kitware.com/import-cmake-the-experiment-is-over/
# Configure and build
CXX=/usr/local/gcc-15.2/bin/g++ \
CC=/usr/local/gcc-15.2/bin/gcc \
cmake -GNinja ..
ninja -vNote: the export LD_LIBRARY_PATH might not be necessary.
export LD_LIBRARY_PATH=/usr/local/gcc-15.2/lib:$LD_LIBRARY_PATH
./hello
- CMake: 3.28.3
- Ninja: 1.13.1
- GCC: 15.2.0