The template depdendes on:
- cmake 3.25+
- conan 2.0+
- a compiler
- (optional) ccache
- (optional) clang-tidy
- (optional) clang-format
- (optional) cppcheck
For Chinese, you can learn how to install all these with VSCode on Windows/MacOS here.
You can install all these dependencies using setup-cpp, for example, on Windows, you can run the following to install llvm, cmake, ninja, ccache, and cppcheck.
# windows example (open shell as admin)
curl -LJO "https://github.com/aminya/setup-cpp/releases/download/v0.5.7/setup_cpp_windows.exe"
./setup_cpp_windows --compiler llvm --cmake true --ninja true --ccache true --cppcheck true
RefreshEnv.cmd # reload the environment
- for Linux, you may install quickly using the system package tool.
- for Windows, you may use choco.
- for MacOS, you may use homebrew.
-
cmake
Install command
-
Debian/Ubuntu:
sudo apt install cmake
-
Windows:
choco install cmake -y
-
MacOS:
brew install cmake
-
-
conan
Install command
-
Debian/Ubuntu:
sudo apt install python3 pip3 install conan
-
Windows:
choco install conan -y
-
MacOS:
brew install conan
-
-
a C++ compiler that supports C++20. See cppreference.com to see which features are supported by each compiler. The following compilers should work:
-
gcc 11+
Install command
-
Debian/Ubuntu:
sudo apt install build-essential
-
Windows:
choco install mingw -y
-
MacOS:
brew install gcc
-
-
clang 16+
Install command
-
Debian/Ubuntu:
bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
-
Windows:
choco install llvm -y
-
MacOS:
brew install llvm
-
-
Visual Studio 2019+
Install command
The most friendly way is to install the software
-
-
ccache
Install command
-
Debian/Ubuntu:
sudo apt install ccache
-
Windows:
choco install ccache -y
-
MacOS:
brew install ccache
-
-
llvm (clang-tidy, clang-format)
Install command
-
Debian/Ubuntu:
sudo apt install llvm
-
Windows:
choco install llvm -y
-
MacOS:
brew install llvm
-
-
cppcheck
Install command
-
Debian/Ubuntu:
sudo apt install cppcheck
-
Windows:
choco install cppcheck -y
-
MacOS:
brew install cppcheck
-
-
include-what-you-use
Install command
Follow instructions here: https://github.com/include-what-you-use/include-what-you-use#how-to-install