Dependencies
- C++20
- CMake 3.14+
Instructions: Linux/Ubuntu/GCC
Check your GCC version:
g++ --version
The output should be something like:
g++-8 (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0
If you see a version before GCC-10, update it with
sudo apt update
sudo apt install gcc-10
sudo apt install g++-10
Once you installed a newer version of GCC, you can link it to update-alternatives
. For instance, if you have GCC-7 and GCC-10, you can link them with:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 7
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
You can now use update-alternatives
to set your default gcc
and g++
to a more recent version:
update-alternatives --config g++
update-alternatives --config gcc
Also check your CMake version:
cmake --version
If it’s older than CMake 3.14, update it with
sudo apt upgrade cmake
or download the most recent version from cmake.org.
Later when running CMake, make sure you are using GCC-8 or higher by appending the following options:
-DCMAKE_C_COMPILER=/usr/bin/gcc-10 -DCMAKE_CXX_COMPILER=/usr/bin/g++-10
Instructions: Mac Os/Clang
Check your Clang version:
clang --version
The output should have something like
Apple clang version 11.0.0
If you see a version before Clang 11, update LLVM+Clang:
curl --output clang.tar.xz -L https://github.com/llvm/llvm-project/releases/download/llvmorg-11.0.0/clang+llvm-11.0.0-x86_64-apple-darwin.tar.xz
mkdir clang
tar -xvJf clang.tar.xz -C clang
cd clang/clang+llvm-11.0.0-x86_64-apple-darwin
sudo cp -R * /usr/local/
Update CMake with
sudo brew upgrade cmake
or download the most recent version from cmake.org.
If the last command fails because you don’t have Homebrew on your computer, you can install it with
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
or you can follow the instructions in https://brew.sh.
Instructions: Windows/MSVC
- Make sure you have a recent version of Visual Studio
- Download Git from https://git-scm.com/download/win and install it
- Download CMake from https://cmake.org/download/ and install it
You can see the dependencies in source/CMakeLists.txt
.