You'll need a fairly bleeding edge compiler and build system for this.
Ninja 1.12.1
You'll want to upgrade Ninja to a version that supports scanning for C++ modules.
ubuntu:
wget https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip
sudo apt-get install -y unzip
sudo unzip ninja-linux.zip -d /usr/local/bin/
sudo chmod +x /usr/local/bin/ninja
macOS:
Clang++-19
Next you'll need a version of Clang++ (and clang-tools) that supports c++23 pretty well. Currently I use clang++-19
.
clang-tools-19
is required because we need clang-scan-deps-19
to be installed for C++ modules support out of CMake
.
ubuntu:
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 19
sudo apt install clang-19 clang-tools-19 clangd-19 lldb-19 lld-19
macOS:
brew install llvm@19
export PATH="/usr/local/opt/llvm@19/bin:$PATH"
ln -s /usr/local/opt/llvm@19/bin/clang++ /usr/local/opt/llvm@19/bin/clang++-19
Doxygen 1.12.0
Documentation requires Doxygen 1.12.0 or later.
ubuntu:
sudo apt-get uninstall doxygen
wget https://www.doxygen.nl/files/doxygen-1.12.0.linux.bin.tar.gz
tar xvfpz doxygen-1.12.0.linux.bin.tar.gz
cd doxygen-1.12.0/
sudo make install
doxygen --version
macOS:
wget --no-verbose https://www.doxygen.nl/files/Doxygen-1.12.0.dmg
hdiutil attach Doxygen-1.12.0.dmg
sudo ln -s /Applications/Doxygen.app/Contents/Resources/doxygen /usr/local/bin/doxygen
CMake 3.30.5
We need a fairly modern CMake in order to get C++ modules support.
ubuntu:
sudo apt-get remove cmake
wget https://cmake.org/files/v3.30/cmake-3.30.5-linux-x86_64.sh -O cmake-3.30.5.sh
chmod +x cmake-3.30.5.sh
sudo ./cmake-3.30.5.sh --prefix=/usr/local --exclude-subdir
cmake --version # you may need to restart your shell
macOS:
CCache
CCache makes development a lot faster and is use by the default CMakePreset.json
preset. Not strictly necessary, but it is an easy win.
ubuntu:
sudo apt-get install -y ccache
macOS: